cc_staff
311
edits
No edit summary |
m (Update install packages to use module version and point to cran) |
||
Line 94: | Line 94: | ||
To install packages from [https://cran.r-project.org/ CRAN], you can use <tt>install.packages</tt> while running an interactive R session on the cluster's login node. Many R packages are developed using the GNU family of compilers so we recommend that you load a <tt>gcc</tt> [[Utiliser des modules/en|module]] before trying to install any R packages. Use the same version of the <tt>gcc</tt> for all packages you install. | To install packages from [https://cran.r-project.org/ CRAN], you can use <tt>install.packages</tt> while running an interactive R session on the cluster's login node. Many R packages are developed using the GNU family of compilers so we recommend that you load a <tt>gcc</tt> [[Utiliser des modules/en|module]] before trying to install any R packages. Use the same version of the <tt>gcc</tt> for all packages you install. | ||
{{Command | {{Command | ||
|module load gcc | |module load gcc/7.3.0 r/4.0.2 | ||
}} | }} | ||
For example, to install the <tt>sp</tt> package that provides classes and methods for spatial data, use the following command on a login node: | For example, to install the <tt>sp</tt> package that provides classes and methods for spatial data, use the following command on a login node: | ||
Line 103: | Line 103: | ||
|result= | |result= | ||
[...] | [...] | ||
> install.packages( | > install.packages('sp', repos='https://cloud.r-project.org/') | ||
}} | }} | ||
<!--T:20--> | <!--T:20--> | ||
If the argument <tt>repos</tt> is not specified, you will be asked to select an appropriate mirror for download. Ideally, it will be geographically close to the cluster you're working on. | |||
<!--T:21--> | <!--T:21--> |