Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Since Rogo 5.1 the Calculation question type can use R and requires Rserve to function correctly. This is a quick guide to setting up Rserve on ubuntu.

  1. Install R ($ sudo apt-get install r-base)
  2. Install Rserve
    1. set any required http proxies ($ export http_proxy="http://proxy.myinstitution.ac.uk:8080/")
    2. Start R ($ R)
    3. Install Rserve within R ( R> install.packages("Rserve", repos="http://cran.uk.r-project.org/") )
    4. test Rserve
Code Block
languagebash
> library(Rserve)
> Rserve()

 


you should see "Rserve started in daemon mode." > q() Stop the spawned demon $ killall -s9 Rserve

...

  1. Configure firewall rules if required
  2. Set the Rserve IP in the Rogo config file (can be localhost or an IP address of a different server)
Code Block
languagephp
$enhancedcalculation = array('host' => 'localhost', 'port'=>6311,'timeout'=>5);

Edit the following line in the config file to read:

Code Block
languagephp
$enhancedcalc_type = 'Rrserve';

 

  1. in the configuration screen.


Rserve can be run on any server and is not needed during an exam. This function is still in rapid development so some of this may change and work on the performance implications and optimization is ongoing.

Info
The Rserve integration in Rogo requires that PHP has the sockets extension enabled

Centos 6 OR RHEL

For Centos 6 use Extra Packages for Enterprise Linux http://fedoraproject.org/wiki/EPEL

Code Block
languagebash
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm yum install R