To access the default version of R on the HEC, simply type the command:


module add R


R can now be invoked in your session by simply typing R. To see what other versions of R are currently available, type:

module avail R


See the enviornment modules page of the HEC Guide for more details on the module command.



More information

 A sample batch job script for R

R batch jobs may be run by creating a batch job control script (for instance, called R_job.com) like the following:

#$ -S /bin/bash

#$ -q serial
#$ -N myRjob

source /etc/profile

module add R

R CMD BATCH --no-save R.input


where R.input is the name of the file containing the job's input instructions (what you would type on the keyboard if you were running a job interactively).

The script is then submitted for running by typing:

qsub R_job.com


R may also be run interactively by first requesting an interactive session on the HEC by starting an interactive job and then simply invoking:

module add R


followed by:

R