Bureaucrats, cc_docs_admin, cc_staff
2,879
edits
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
|module load r/3.3.3 | |module load r/3.3.3 | ||
}} | }} | ||
For more on this see [[Utiliser des modules/en|Using modules.]] | |||
<!--T:10--> | <!--T:10--> | ||
Now you can start the R interpreter and type R code inside that environment: | |||
{{Command | {{Command | ||
|lang="R" | |lang="R" | ||
Line 53: | Line 54: | ||
> q() | > q() | ||
}} | }} | ||
To execute R | |||
To execute an R script non-interactively, use <code>Rscript</code> with the file containing the R commands as an argument: | |||
<!--T:16--> | <!--T:16--> | ||
Line 59: | Line 61: | ||
<!--T:17--> | <!--T:17--> | ||
<code>Rscript</code> will automatically pass scripting-appropriate options <tt>--slave</tt> and <tt>--no-restore</tt> to the R interpreter. These also imply the <tt>--no-save</tt> option, preventing the creation of useless workspace files on exit. | |||
Note that '''any calculations lasting more than two or three minutes should not be run on the login node'''. | |||
They should be run via the job scheduler. See [[Running jobs]] for more information. | |||
== Installing R packages == | == Installing R packages == |