r

  • About: free software environment for statistical computing and graphics
  • Category: Data Analysis
  • URL: http://www.r-project.org
  • Interactive executable: R
module (bold = default) build dependencies
r/3.0.1/b1 bwidget/1.9.7 netcdf/4.3.1.1/b1 hdf5/1.8.14
r/3.1.0/b1 intel 2013.1.046 intel/2013.1.046 jdk/1.8.0
r/3.1.0/b2 gcc 4.4.7 jre/1.8.0
r/3.2.0/b1 gcc 4.4.7 jre/1.8.0
r/3.2.0/b2 gcc 4.4.7 - supports rmpi/snow jre/1.8.0
r/3.2.3/b1 gcc 4.4.7 jre/1.8.0
r/3.2.4/b1 gcc 4.4.7 jre/1.8.0
r/3.2.5/b1 gcc 4.4.7 jre/1.8.0
r/3.3.0/b1 bzip2/1.0.6 jdk/1.8.0 zlib/1.2.8/b3 xz/5.2.1/b1 pcre/8.35/b1 curl/7.48.0
r/3.3.1/b1 bzip2/1.0.6 jdk/1.8.0 zlib/1.2.8/b3 xz/5.2.1/b1 pcre/8.35/b1 curl/7.48.0
r/3.3.2/b1 bzip2/1.0.6 jdk/1.8.0 zlib/1.2.8/b3 xz/5.2.1/b1 pcre/8.35/b1 curl/7.48.0
r/3.3.2/b2 gcc/4.9.4 bzip2/1.0.6 jdk/1.8.0 zlib/1.2.8/b3 xz/5.2.1/b1 pcre/8.35/b1 curl/7.48.0
r/3.3.2/b3 gcc 4.9.4 + mkl gcc/4.9.4 bzip2/1.0.6 jdk/1.8.0 zlib/1.2.8/b3 xz/5.2.1/b1 pcre/8.35/b1 curl/7.48.0 intel/mkl-2017.0516
r/3.3.3/b1 gsl/1.16/b1 gcc/4.9.4 bzip2/1.0.6 jdk/1.8.0 zlib/1.2.8/b3 xz/5.2.1/b1 pcre/8.35/b1 curl/7.48.0

To run a script file (say it is called test.R) in batch mode, type or put in your sbatch script:

R --no-save < test.R

Here is simple example for the Rmpi package.

tmp.R:

library(Rmpi)
rank <- mpi.comm.rank(comm = 0)
size <- mpi.comm.size(comm = 0)
hostname <- mpi.get.processor.name()
cat(sprintf("Hello from process %3d of %3d on %s\n", rank, size, hostname))
mpi.finalize()

tmp.sbatch:

#!/bin/bash
#SBATCH --partition=debug --time=00:01:00 --output=tmp.out.txt
#SBATCH --ntasks=4
module load r/3.1.0/b2 openmpi/1.6.5/b1
mpirun -n 4 Rscript tmp.R

also see slides from the CIRC summer school workshop on R.

also see Using Software.