R: Difference between revisions

Jump to navigation Jump to search
143 bytes added ,  1 year ago
State explicitly that installing R packages in jobs is not possible
No edit summary
(State explicitly that installing R packages in jobs is not possible)
Line 94: Line 94:
=== install.packages() === <!--T:69-->
=== install.packages() === <!--T:69-->


To install packages from [https://cran.r-project.org/ CRAN], you can use <code>install.packages</code> 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 <code>gcc</code> [[Utiliser des modules/en|module]] before trying to install any R packages. Use the same version of the <code>gcc</code> for all packages you install.
To install packages from [https://cran.r-project.org/ CRAN], you can use <code>install.packages</code> while running an interactive R session on a cluster login node. Since the compute nodes on most clusters do not have access to the Internet, installing R packages in a batch or interactive job is not possible. Many R packages are developed using the GNU family of compilers so we recommend that you load a <code>gcc</code> [[Utiliser des modules/en|module]] before trying to install any R packages. Use the same version of the <code>gcc</code> for all packages you install.
{{Command
{{Command
|module load gcc/9.3.0 r/4.0.2
|module load gcc/9.3.0 r/4.0.2
}}
}}
==== Installing for a specific R version ==== <!--T:18-->
==== Installing for a specific R version ==== <!--T:18-->
For example, to install the <code>sp</code> package that provides classes and methods for spatial data, use the following command on a login node:
For example, to install the <code>sp</code> package that provides classes and methods for spatial data, use the following command on a login node:
cc_staff
166

edits

Navigation menu