This is a somewhat generalized version of this question. How do I set R_LIBS_SITE
? I am not able to get proper values for it on both CentOS 7.2 and openSUSE 42.1 with the most recent R 3.3.1.
On CentOS 7.2 (Linux x86_64) with R from EPEL I get:
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
...
Platform: x86_64-redhat-linux-gnu (64-bit)
...
> .libPaths()
[1] "/usr/lib64/R/library" "/usr/share/R/library"
> .Library
[1] "/usr/lib64/R/library"
> .Library.site
[1] "/usr/lib64/R/library" "/usr/share/R/library"
> R.home(component = "home")
[1] "/usr/lib64/R"
However, the respective Renviron includes the following:
$ grep R_LIBS_SITE /usr/lib64/R/etc/Renviron
R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/local/lib/R/library:/usr/lib64/R/library:/usr/share/R/library'}
Apparently, this setting is not applied properly when I start R. However,
changes for example in R_LIBS_USER in the same file are applied. In addition, R_LIBS_SITE
is not ignored completely because setting it to
R_LIBS_SITE='/usr/local/lib/R/site-library'
produces
> .Library.site
character(0)
I don't see where R_LIBS_SITE
could be overwritten elsewhere. I get
the same behaviour in R when I start it with
R --no-environ --no-site-file --no-init-file
I can reproduce a similar behaviour with openSUSE.
Or is there another recommended way to set a package site shared amongst all users?