Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| r [2013/12/19 08:28] – [SGE Script] admin | r [2018/06/08 07:36] (Version actuelle) – [Installed version] admin | ||
|---|---|---|---|
| Ligne 6: | Ligne 6: | ||
| ====== Installed version ====== | ====== Installed version ====== | ||
| - | * 2.11.1 | + | * 3.0.2 |
| - | * 2.15.2 | + | * 3.3.0 |
| + | * 3.5.0 | ||
| <code bash> | <code bash> | ||
| - | $ module avail r | + | $ module avail lang/r |
| - | r/2.11.1 | + | |
| + | </code> | ||
| + | |||
| + | Use '' | ||
| + | <code bash> | ||
| + | $ module load lang/r/3.5.0 | ||
| </ | </ | ||
| ====== Using R ====== | ====== Using R ====== | ||
| Ligne 21: | Ligne 27: | ||
| <file bash R_Script.sge> | <file bash R_Script.sge> | ||
| - | # | + | #!/bin/bash |
| - | #$ -V | + | |
| #$ -N RScript_sge | #$ -N RScript_sge | ||
| - | #$ -cwd | + | |
| #$ -o $JOB_NAME.$JOB_ID.out | #$ -o $JOB_NAME.$JOB_ID.out | ||
| - | #$ -e $JOB_NAME.$JOB_ID.err | ||
| - | |||
| - | module load r | ||
| - | R CMD BATCH scriptTest.r output | + | #$ -l h_vmem=4G |
| + | module load lang/ | ||
| + | |||
| + | R CMD BATCH scriptTest.r output | ||
| + | ## or | ||
| + | Rscript scriptTest.r params | ||
| </ | </ | ||
| Ligne 39: | Ligne 47: | ||
| $ qsub R_Script.sge | $ qsub R_Script.sge | ||
| </ | </ | ||
| + | |||
| + | ===== Install Local R Packages ===== | ||
| + | First we need to create a local folder in WORK directory: | ||
| + | <code bash> | ||
| + | $ mkdir -p $WORK/ | ||
| + | </ | ||
| + | Second, we install package by giving the path to our local folder: | ||
| + | For example: | ||
| + | We start R session | ||
| + | <code bash> | ||
| + | $ R | ||
| + | </ | ||
| + | We change directory to '' | ||
| + | <code bash> | ||
| + | $cd $WORK | ||
| + | </ | ||
| + | And finally | ||
| + | <code bash> | ||
| + | install.packages(" | ||
| + | </ | ||
| + | |||