[R-SIG-Mac] adjusting .libPaths

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Apr 28 21:45:13 CEST 2022


On 28/04/2022 1:55 p.m., Kevin Ushey wrote:
> FWIW, you shouldn't need to set R_LIBS_USER in this way -- R will
> choose a sensible default value for you based on your platform + the
> version of R being launched.
> 
> I suspect you would see the "right" behavior if you removed that entry
> from your .Renviron altogether (and you wouldn't need to remember to
> change it in the future)
> 
> See also ?.expand_R_libs_env_var for more information.

Thanks for pointing that out.  In the past, I thought the following 
could happen:

  - a user with no home dir library tries to install a package.

  - R can't write to the system library, so creates a home dir library 
and writes there.  The package is successfully installed.

  - Next session, R is started without specifying a home dir library, 
and can't find the new package.

The help page you point to makes it look as though this won't happen. 
Maybe it never did:  maybe the problems only arose when people specified 
R_LIBS_USER incorrectly.

Duncan Murdoch



More information about the R-SIG-Mac mailing list