I upgraded R to v2.14.0, and along with the upgrade I decided to move the standard package repository to Dropbox, so that the laptop and desktop are in sync all the time. I set my R_LIBS=/Dropbox/ToolBox/R/packages
to .Renviron
, and when I open Rstudio or R.app (mac), I get the following commands:
> Sys.getenv("R_LIBS") [1] "/Dropbox/Toolbox/R/packages" > .libPaths() [1] "/Dropbox/Toolbox/R/packages" [2] "/Library/Frameworks/R.framework/Versions/2.14/Resources/library" [3] "/Applications/RStudio.app/Contents/Resources/R/library
but when I run the same commands in .Snw (Textmate + Sweave), I get:
> Sys.getenv("R_LIBS") [1] "" > .libPaths() [1] "/Library/Frameworks/R.framework/Versions/2.14/Resources/library"
As you can see above, when I call R from Sweave, it only picks up a standard repository. I created Renviron.site
, Rprofile.site
, read help(Startup)
after similar q1 and q2 questions without success.
Can someone shed some light (step by step) on how to solve this problem?
Update: When I sweave my .Snw from inside R, it picks up all the correct folders. I am not sure why, when this is done from textmate, you are doing something else.
Any ideas?
Altons
source share