R is an integrated technical computing environment that combines sophisticated computation, advanced graphics and visualization, and a high-level programming language.

On Rivanna, R is available through modules, with more than one version usually available.

module spider R

Rstudio is also supported through its own module. You must first load a version of R

module load R/3.4.0

followed by

module load rstudio

Once you have developed your script, you can submit it to the compute nodes with a SLURM script similar to the following: 

#SBATCH -n 1
#SBATCH -t 01:00:00
#SBATCH -o myRprog.out
#SBATCH -p standard
#SBATCH -A mygroup

module load R
Rscript myRprog.R

R can be run in parallel.  Contact arcs@virginia.edu for consulting in optimizing and parallelizing your scripts.

This is a SLURM job command file to run a parallel R batch job using the Rmpi or parallel packages.

#SBATCH -n 2
#SBATCH --ntasks-per-node=10
#SBATCH -t 00:30:00
#SBATCH -o myRprog.out
#SBATCH -p parallel
#SBATCH -A mygroup

module load gcc
module load openmpi
module load R

srun Rscript myRprog.R