tags:

views:

154

answers:

1

Due to the new R 2.11 release, I want to implement Dirk's suggestion here.

So for that I am asking - How can I (permanently) change R's library path? (The best solution would be one that can be run from within R)

+1  A: 

Please see the 'R Installation and Admin manual' and/or help(Startup); there are several options that are clearly documented.

You have several environment variables you can set; and several options about where to set them. My previous answer provides one; you did not say why you do not want to or cannot use it. But all other options are clearly documented; the question has also been re-hashed dozens of times on r-help.

Dirk Eddelbuettel
I have been look here - http://cran.r-project.org/bin/windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f with no success. I'll check in that manual then.
Tal Galili
o.k, using the example in the text, I get an error... Error: 16:10: unexpected '/'16: R_LIBS=C:/
Tal Galili
Yes, you need to protect strings with quotes
Dirk Eddelbuettel
Thanks Dirk, actually - the error was because I didn't work with Renviron.site but instead used Rprofile.site ("You live, you learn...")
Tal Galili
Note that those files are (on all systems) inside the R 'tree' and will be replaced by the next version. Consider user-local files, or system-wide environment variables.
Dirk Eddelbuettel
Thanks Dirk, I did - I'll publish what I wrote tomorrow, and would love for your feedback. Best, Tal
Tal Galili