On Sun, 9 May 2010 16:50:17 -0500,
Dirk Eddelbuettel <[email protected]> wrote:
> There are still a number of possibilities in the R Inst + Admin
> manual; a simple one would be to set the env. var R_LIBS via
> /etc/environment.
> But you need to tell us what you can or cannot do or want to do. The
> 'No Psychics here' rule applies for you too :)
I don't know what else to add to what I've already said, but here's a
scenario to illustrate. Suppose you have R-devel in ~/src/R-devel and
then you call ~/src/R-devel/bin/R and do library(RPostgreSQL).
RPostgreSQL requires DBI, and you have RPostgreSQL in
/usr/local/lib/R/site-library and DBI in /usr/lib/R/site-library because
you installed the former via install.packages() and the latter via
r-cran-dbi, both of which you use normally with Debian R packages. If
you wanted this to work then both libraries should be in the return
value of .libPaths(), which is not the case with a locally-built R-devel
like the one I described.
Anything you modify in ~/src/R-devel (I think that's what you're
suggesting) will be wiped out the next time you update and rebuild it,
so it's not convenient. So it seems the only options are ~/.Rprofile
and ~/.Renviron and am not sure what to use in these so that if R-devel
is started then R_LIBS or R_LIBS_SITE or R_LIBS_USER include both of
these libraries *in addition* to the default ones defined by R-devel.
Nothing needs changing if Debian R is started.
As it is, R-devel shows:
---<--------------------cut here---------------start------------------->---
R> Sys.getenv("R_LIBS")
R_LIBS
""
R> Sys.getenv("R_LIBS_SITE")
R_LIBS_SITE
""
R> Sys.getenv("R_LIBS_USER")
R_LIBS_USER
"~/R/x86_64-unknown-linux-gnu-library/2.12"
---<--------------------cut here---------------end--------------------->---
while Debian R:
---<--------------------cut here---------------start------------------->---
R> Sys.getenv("R_LIBS")
R_LIBS
""
R> Sys.getenv("R_LIBS_SITE")
R_LIBS_SITE
"/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library"
R> Sys.getenv("R_LIBS_USER")
R_LIBS_USER
"~/R/x86_64-pc-linux-gnu-library/2.11"
---<--------------------cut here---------------end--------------------->---
--
Seb
_______________________________________________
R-SIG-Debian mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-debian