Hi,
I would like to have the same library path order on the command-line R and RStudio Server (open source). Is there a way to do this system-wide for all users without having to set .libPaths() at runtime?
Command-line R:
> .libPaths()
[1] "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/gcc9/r-bundle-bioconductor/3.14"
[2] "/home/nicolas.dejay/R/x86_64-pc-linux-gnu-library/4.1"
[3] "/cvmfs/[soft.computecanada.ca/easybuild/software/2020/avx512/Core/r/4.1.2/lib64/R/library](http://soft.computecanada.ca/easybuild/software/2020/avx512/Core/r/4.1.2/lib64/R/library)"
Sys.getenv()[grep("R_LIBS", names(Sys.getenv()))]
R_LIBS /cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/gcc9/r-bundle-bioconductor/3.14
R_LIBS_SITE
R_LIBS_USER ~/R/x86_64-pc-linux-gnu-library/4.1
RStudio Server (and command-line R when ~/R
is empty)
> .libPaths()
[1] "/home/kleinman/nicolas.dejay/R/x86_64-pc-linux-gnu-library/4.1"
[2] "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/gcc9/r-bundle-bioconductor/3.14"
[3] "/cvmfs/[soft.computecanada.ca/easybuild/software/2020/avx512/Core/r/4.1.2/lib64/R/library](http://soft.computecanada.ca/easybuild/software/2020/avx512/Core/r/4.1.2/lib64/R/library)"
> Sys.getenv()[grep("R_LIBS", names(Sys.getenv()))]
R_LIBS /cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/gcc9/r-bundle-bioconductor/3.14
R_LIBS_SITE
R_LIBS_USER ~/R/x86_64-pc-linux-gnu-library/4.1
Both RStudio Server and command-line R are using the same version of R and with the following environment variable set:
R_LIBS=/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx512/Compiler/gcc9/r-bundle-bioconductor/3.14
Thank you!