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

Marius Hofert marius.hofert at math.ethz.ch
Mon Oct 10 13:07:02 CEST 2011

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:

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:
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.



More information about the R-SIG-Mac mailing list