From edd @end|ng |rom deb|@n@org  Wed Dec  9 03:14:18 2020
From: edd @end|ng |rom deb|@n@org (Dirk Eddelbuettel)
Date: Tue, 8 Dec 2020 20:14:18 -0600
Subject: [Rd] Ignore Sites Option For libPaths
In-Reply-To: <SYBPR01MB4761B1924B1D1F29B8A33F8FCDCC0@SYBPR01MB4761.ausprd01.prod.outlook.com>
References: <SYBPR01MB4761B85D4678C2CCB95E9988CDCD0@SYBPR01MB4761.ausprd01.prod.outlook.com>
 <24528.5452.10417.544814@rob.eddelbuettel.com>
 <SYBPR01MB4761B1924B1D1F29B8A33F8FCDCC0@SYBPR01MB4761.ausprd01.prod.outlook.com>
Message-ID: <24528.13050.93732.939622@rob.eddelbuettel.com>


On 9 December 2020 at 02:00, Dario Strbenac wrote:
| That seems like a straightforward and reasonable thing to do, but:
| 
| ~$ R_LIBS="/tmp" R_LIBS_SITE="/var" Rscript -e 'print(.libPaths())'
| [1] "/dora/nobackup/biostat/Rpackages/v4" "/dora/users/course/splus/library/R" 
| [3] "/usr/lib/R/site-library"             "/usr/lib/R/library"

Hm. Maybe you have code in RHOME/etc/* or in HOME to set some of these?

The (very detailed) description of what happens when is in help(Startup)
which is a great resource but as dense as they get. My example came from my
Ubuntu 20.04 box where I set nothing apart from not using a ~/R/ path.

Also try "R -q -e 'print(.libPaths())'" with these switches to narrow it down:

  --no-environ          Don't read the site and user environment files
  --no-site-file        Don't read the site-wide Rprofile                 
  --no-init-file        Don't read the user R profile

| /tmp and /var exist of course.

Right, I didn't stress that but the choice made it clear.  I still think you
should be able to tune this with just base R.

Cheers, Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



[Rd] Ignore Sites Option For libPaths
Dirk Eddelbuettel