My personal library is set as R_LIBS=~/.R/lib in ~/.Renviron. This works perfectly well when I install packages from rstudio. When I try installing new packages from a plain
Yes, I always unset it on the systems I use, and I even try to keep it out of the Debian package I maintain. In Debian we use
/usr/lib/R/library for core R packages shipping with R
/usr/lib/R/site-library for r-cran-* packages from the distro
/usr/local/lib/R/site-library for what the user installs from CRAN
with the appropriate ordering:
R> .libPaths()
[1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" \
"/usr/lib/R/library"
R>
and I do that by commenting this out
#R_LIBS_USER=${R_LIBS_USER-'~/R/x86_64-pc-linux-gnu-library/3.1'}
#R_LIBS_USER=${R_LIBS_USER-'~/Library/R/3.1/library'}
# 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
R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:\
/usr/lib/R/site-library:/usr/lib/R/library'}
and I think I have to update my patch in the Debian packaging...