I am trying to install some R packages on my account on the HPC cluster. However when I do that I get the following error:
no permission to install to directory '/gpfs1/apps/sw/R/R-3.6.1/lib64/R/library'
I have contacted the admin and he told me I do need admin privilages to install anything to /gpfs1/apps/sw/
. He told I must rather do that in the home directory.
How can I switch to the home directory on my account ? The admin has already installed some other R packages on my account but I need to install some myself ? How do I know where my R packages are on the home directory and how to install everything there ?
Output of .libPaths()
"/gpfs1/apps/sw/R/R-3.6.1/lib64/R/library"
Update
Using the following tutorial I am now able to install R packages in my home directory on the cluster using the following command:
export R_LIBS_USER=/home/rcf-proj/tt/trojan/R/parallel:$R_LIBS_USER
which adds the path above to .libPaths(). However, when running my R script it keeps referring to the original location /gpfs1/apps/sw/R/R-3.6.1/lib64/R/library
where I don't have the packages I installed in my HOME directory. Especially that after I restart R, I must always do this command.
In the answers here They recommended I edit the .libPaths() in the .Rprofile
file, but I cannot seem to find it on my cluster account. The same issue is still open here
I have read it somewhere that we car create a .Rprofile
ourselves, but how can I do this and what must I put in it ??