[R-SIG-Mac] R_LIBS + .Rprofile: how to get a specific library in .libPaths()[1]

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 10 13:27:08 CEST 2011

You are taking the contents of a .Renviron file and putting it in 

There is a whole section at the help page you quote about not 
confusing the two ....

On Mon, 10 Oct 2011, Marius Hofert wrote:

> Dear all,
> I would like to use my own library for packages. It should go in /Library/Frameworks/R.framework.
> I therefore created a directory /Library/Frameworks/R.framework/library and now I would like this to appear as .libPaths()[1] (as default directory used by install.packages()). I created an file ~/.Rprofile and put in:
> R_LIBS="/Library/Frameworks/R.framework/library"
> I first had it without quotation marks, but then R complains about the slash. So at least I know that R finds my .Rprofile file. With quotation marks, no error appears, but when I execute .libPaths()[1], I still get the default-R library:
> "/Library/Frameworks/R.framework/Versions/2.13/Resources/library".
> How can I get my own library?
> I read http://stat.ethz.ch/R-manual/R-patched/library/base/html/Startup.html and since neither ‘R_HOME/etc/Rprofile.site’ nor R_PROFILE_USER are specified, I thought I create the file .Rprofile.
> This is on Mac OS X 10.7.1 with R 2.13.
> Cheers,
> Marius
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-SIG-Mac mailing list