R is a language and environment for statistical computing and graphics. It is similar to the S language and environment developed at Bell Laboratories (formerly AT&T, now Lucent Technologies). R provides a wide variety of statistical and graphical techniques and is highly extensible.
R is available to all OSC users without restriction.
The following versions of R are available on OSC systems:
Version | Oakley | Owens |
---|---|---|
2.14.1 | X | |
2.15.0 | X | |
2.15.2 | X | |
3.0.1 | X | |
3.1.3 | X | |
3.2.0 | X | |
3.3.1 | X* | X |
3.3.2 | X* |
In order to configure your environment for the usage of R, run the following command:
module load R
Once your environment is configured, R can be started simply by entering the following command:
R
For a listing of command line options, run:
R --help
Running R interactively on a login node for extended computations is not recommended and may violate OSC usage policy. In order to run R in batch, reference the example batch script below. This script requests one full node on the Oakley cluster for 1 hour of walltime.
#PBS -N R_ExampleJob #PBS -l nodes=1:ppn=12 module load R cd $PBS_O_WORKDIR cp in.dat $TMPDIR cd $TMPDIR R CMD BATCH test.R test.Rout cp test.Rout $PBS_O_WORKDIR