[R] R_LIBS var needed to be set after upgrade to R 4.2.2

Martin Maechler
2022-06-01T08:35:48Z

>>>>> Ashim Kapoor
>>>>>     on Wed, 1 Jun 2022 11:24:21 +0530 writes:

    > Dear All,

> I upgraded to R 4.2.2  on Debian 10 today.

Well, I assume you mean R 4.2.0 .. at least that one exists.

    > The R shell incantation worked fine and all libraries would load but,
    > I needed to point the R_LIBS variable to
    > /usr/local/lib/R/site-library/ in order for the R --vanilla <
myfile.R
    > incantation to find the libraries.

you mean other installed *packages*

    > May I ask, why was this ? I never needed to do this on any previous
    > upgrade to R.

Well,  for me, the     R --vanilla   form also only sees the
29 (14 "base" + 15 "Recommended") packages that come with R.

Debian (& Ubuntu etc)  have used a similar setup where the
default {R-level}  .libPaths() has contained three libraries,
via

R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}

see

   https://cloud.r-project.org/bin/linux/debian/#pathways-to-r-packages

also for much more.
Note (also from the above CRAN page
      https://cloud.r-project.org/bin/linux/debian/
   [ Remember "menu"  "Binaries" -> "Linux"
-> "Debian" ]

The good thing about the Debian (and derivatives) setup is that
it also separates (as I do) the  "packages that come with R" in
one library (= /usr/lib/R/library) from packages that are
installed differently.


    > Many thanks,
    > Ashim