Connecting Infrastructure, Connecting Research

R

R

Version

Installed version: 2.6.0
Latest version: 2.6.0

Additional packages installed: Matrix(0.999375-3), lme4(0.99875-9), Rmpi(0.5-5)

Description

R is a language and environment for statistical computing and graphics. R provides a wide variety of statistical (linear and nonlinear modelling, classical statistical tests, time-series analysis, classification, clustering, ...) and graphical techniques, and is highly extensible. More...

License

R is available as Free Software under the terms of the Free Software Foundation's GNU General Public License in source code form. It does not need any special permissions to run on the NGS.

Running R

The graphical user interfaces for R are not supported on the NGS. Instead, R is run on the globus command line, as below, or via an NGS web portal template.

  • Example serial run of R on an example on the NGS node (ngs.rl.ac.uk) at RAL:
  • Copy or stage the example file from /apps/R/examples/test.R into /home/ngsxxx/R.

    Use the following globus command (one line):

    globusrun -b -r ngs.rl.ac.uk/jobmanager-lsf \
    '&(executable=/usr/ngs/R)(jobtype=single) \
    (arguments= R --save) \
    (directory=/home/ngsxxx/R) (stdin=/home/ngsxxx/R/test.R) \
    (stderr=/home/ngsxxx/R/StdErr.txt) \
    (stdout=/home/ngsxxx/R/test.Rout)'

    The output files test.Rout and Rplot.ps can be accessed at /apps/R/R-2.4.1/example for comparison.

  • Example Rmpi parallel run on an example on the NGS node ngs.rl.ac.uk
  • First copy the file
    /apps/R/R-2.6.0/lib64/R/library/Rmpi/Rprofile
    to your run directory (home/ngsxxx/R in the example) as .Rprofile . Then copy or stage the example file from /apps/R/examples/RmpiTest.R into /home/ngsxxx/R.

    Then submit via the globus command (all one line removing the '\')

    globusrun -b -r ngs.rl.ac.uk/jobmanager-lsf \
    '&(executable=/usr/ngs/R)(jobtype=mpi)(count=16) \
    (arguments= R --save CMD BATCH RmpiTest.R) \
    (directory=/home/ngsxxx/R) \
    (stderr=/home/ngsxxx/R/StdErr.txt) \
    (stdout=/home/ngsxxx/R/StdOut.txt)'

    (count=16) to be replaced by the number of processes you want to use, and ngsxxx replaced by your ngs unix userid.

    Note that you don't need to use
    mpi.spawn.Rslaves()
    as the slaves are spawned by ScaliMPI mpirun command triggered by globusrun for (jobtype=mpi)

Documentation

Online documentation for R can be found here.

Contact

STFC-RAL cannot offer any scientific support for this package. However, if you believe there is a problem with the installation or with the information in this page, please contact the NGS helpdesk.