====== R language ======
**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. The S language is often the vehicle of choice for research in statistical methodology, and R provides an Open Source route to participation in that activity.
====== Installed version ======
* 3.0.2
* 3.3.0
* 3.5.0
$ module avail lang/r
Use ''module load '' command to load the needed version. For example :
$ module load lang/r/3.5.0
====== Using R ======
===== SGE Script =====
#!/bin/bash
#$ -N RScript_sge
#$ -o $JOB_NAME.$JOB_ID.out
#$ -l h_vmem=4G ## on demande 4G a adapter
module load lang/r/3.3.0
R CMD BATCH scriptTest.r output
## or
Rscript scriptTest.r params
and submit job :
$ qsub R_Script.sge
===== Install Local R Packages =====
First we need to create a local folder in WORK directory:
$ mkdir -p $WORK/R_libs
Second, we install package by giving the path to our local folder:
For example:
We start R session
$ R
We change directory to ''$WORK''
$cd $WORK
And finally
install.packages("lattice", repos="http://cran.r-project.org", lib="./R_libs")