Articles

Affichage des articles du juillet, 2022

Using only a common lib folder for all users in Ubuntu

In R, you cat get the environment variables: > Sys.getenv("R_HOME") [1] "/usr/lib/R" > Sys.getenv("R_ENVIRON") [1] "" > Sys.getenv("R_PROFILE") [1] "" > Sys.getenv("R_PROFILE_USER") [1] "" The library folder are defined here: > Sys.getenv("R_LIBS_USER") [1] "/home/agirard/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" This is what you get with: .libPaths() In  > system(paste0("ls -al ", file.path(Sys.getenv("R_HOME"), "etc"))) total 16 drwxr-xr-x 2 root    root    4096 juil. 27 20:20 . drwxrwxrwx 8 mgirond mgirond 4096 juil. 28 13:25 .. -rw-r--r-- 1 root    root     234 juin  26 22:22 javaconf lrwxrwxrwx 1 root    root      14 juin  26 22:22 ldpaths -> /etc/R/ldpaths lrwxrwxrwx 1 root    root      15 juin  26 22:22 Makec