Sam H
2022-Apr-25 19:12 UTC
[R-sig-Debian] Where/how to set R_LIBS_SITE in R 4.2.0 for running R as R --vanilla to pick up "/usr/local/lib/R/site-library/"
Hello, I have upgraded to R 4.2.0 on Ubuntu Ubuntu 20.04.4 LTS. Something changed since now when invoking R as "R --vanilla" does not pick up "/usr/local/lib/R/site-library" library anymore. I tried to look at "6.2 Managing libraries" in https://cran.r-project.org/doc/manuals/r-patched/R-admin.html and set R_LIBS_SITE in Renviron.site but with no success. What am I missing? Thanks. If I run R as "R --vanilla" this is what I get: $ R --vanilla R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.> .libPaths()[1] "/usr/lib/R/site-library" "/usr/lib/R/library"> Sys.getenv("R_LIBS_USER")[1] "/home/username/R/x86_64-pc-linux-gnu-library/4.2"> Sys.getenv("R_LIBS_SITE")[1] "/usr/lib/R/site-library">If I run R as "R" correct libraries are picked up: $ R R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.> .libPaths()[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" [3] "/usr/lib/R/library"> Sys.getenv("R_LIBS_USER")[1] "/home/username/R/x86_64-pc-linux-gnu-library/4.2"> Sys.getenv("R_LIBS_SITE")[1] "/usr/local/lib/R/site-library/:/usr/lib/R/site-library:/usr/lib/R/library">-- Best regards, Sam [[alternative HTML version deleted]]
Dirk Eddelbuettel
2022-Apr-25 19:44 UTC
[R-sig-Debian] Where/how to set R_LIBS_SITE in R 4.2.0 for running R as R --vanilla to pick up "/usr/local/lib/R/site-library/"
On 25 April 2022 at 21:12, Sam H wrote: | I have upgraded to R 4.2.0 on Ubuntu Ubuntu 20.04.4 LTS. | | Something changed since now when invoking R as "R --vanilla" does not pick | up "/usr/local/lib/R/site-library" library anymore. I noticed that too when beta testing the earlier builds. It has to do with us (previously) setting value to unset variables ... which are now set. For the Debian package I managed the change by moving the setting to Renviron.site: ## edd Apr 2003 Allow local install in /usr/local, also add a directory for ## Debian packaged CRAN packages, and finally the default dir ## edd Jul 2007 Now use R_LIBS_SITE, not R_LIBS ## edd Mar 2022 Now in Renviron.site reflecting R_LIBS_SITE R_LIBS_SITE="/usr/local/lib/R/site-library/:${R_LIBS_SITE}:/usr/lib/R/library'" If you have those three lines you should be fine. I am (also on Uubuntu 20.04 which a binary from my PPA): # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.4 LTS Release: 20.04 Codename: focal # Rscript --version Rscript (R) version 4.2.0 (2022-04-22) # Rscript -e '.libPaths()' [1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" [3] "/usr/lib/R/library" # Dirk -- dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org