Installing R dependencies
-
Load R module
bash module load R/4.0.5
-
Define the directory where you want to store the R packages you want to add. You can add this variable to your
.bashrc
file.bash export R_LIBS_USER="/homedata/user/R_LIBS"
-
Launch R interpreter
bash R
-
Install your packages in R interpreter
R install.packages("my_package")
Important
Never change the path in the variable R_LIBS
because you will lose access to all the packages installed by default.