[R-sig-Debian] Heads-up: r2u installs (only) to /usr/lib/R/site-library.

Rolf Turner ro||turner @end|ng |rom po@teo@net
Fri May 10 05:16:01 CEST 2024


I started using r2u (see https://eddelbuettel.github.io/r2u) recently
and thought I was having a problem in that I was getting
out-of-date versions of packages.  I made enquiries of Dirk
Eddelbuettel about this, and he enlightened me as to what the problem
really was.  I was seeing old versions of packages that were stored in
a library, different from /usr/lib/R/site-library. I have a personal
library /home/rolf/Rlib into which I had previously always installed
contributed packages. I had R_LIBS set equal to /home/rolf/Rlib, and
.libPaths() returned

    [1] "/home/rolf/Rlib"               "/usr/local/lib/R/site-library"
    [3] "/usr/lib/R/site-library"       "/usr/lib/R/library

and I just assumed that r2u would install to the first entry of
.libPaths().  It doesn't (as the subject line of this email says), but
when I invoke library() I get the package that is stored in this
first entry.

Dirk thought that there would be merit in drawing this phenomenon to
the general attention of users.  There are probably others who, like
me, have a personal library of R packages.  Such users may need to make
adjustments to their R_LIBS environment variable and to how .libPaths()
is set up.

I hope that this message is of some interest.

cheers,

Rolf Turner

-- 
Honorary Research Fellow
Department of Statistics
University of Auckland
Stats. Dep't. (secretaries) phone:
         +64-9-373-7599 ext. 89622
Home phone: +64-9-480-4619



More information about the R-SIG-Debian mailing list