Skip to content
Back to formatted view

Raw Message

Message-ID: <CAEtT+h3-gYNh6bFMaNgfebhW9=M2QhpC3KspZ1RU+sTW=qpTFA@mail.gmail.com>
Date: 2022-04-26T07:43:00Z
From: Sam H
Subject: Where/how to set R_LIBS_SITE in R 4.2.0 for running R as R --vanilla to pick up "/usr/local/lib/R/site-library/"
In-Reply-To: <25191.3042.887662.570093@rob.eddelbuettel.com>

Dirk, thanks.

Changing /etc/R/Renviron by adding
*R_LIBS_SITE="/usr/local/lib/R/site-library/:${R_LIBS_SITE}:/usr/lib/R/library"*
after *R_LIBS_SITE=${R_LIBS_SITE:-'%S'}* seems to solve my problem. So my
/etc/R/Renviron in specified place now looks like this
R_LIBS_USER=${R_LIBS_USER:-'%U'}
R_LIBS_SITE=${R_LIBS_SITE:-'%S'}
R_LIBS_SITE="/usr/local/lib/R/site-library/:${R_LIBS_SITE}:/usr/lib/R/library"

On Mon, Apr 25, 2022 at 11:00 PM Dirk Eddelbuettel <edd at debian.org> wrote:

>
> So in short:  If you want to run R with --vanilla you have to change the
> local set up file. Because R now ships with this
>
>   R_LIBS_USER=${R_LIBS_USER:-'%U'}
>   R_LIBS_SITE=${R_LIBS_SITE:-'%S'}
>
> you could set R_LIBS_USER and/or R_LIBS_SITE in a file read by the OS
> before
> R starts -- a short text snippet in /etc/profile.d/ may work -- to ensure
> R_LIBS_USER and R_LIBS_SITE are set to your liking.
>
> Sorry for missing the hint about --vanilla from your first email.
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>


-- 
Best regards,
Sam

	[[alternative HTML version deleted]]