Sebastian P. Luque
2010-May-09 20:25 UTC
[R-sig-Debian] running a locally built R-devel with libraries from Debian installation
Hi, What is the best way to tell a locally-built R-devel (somewhere in the user home directory) to use the libraries from the Debian installation (i.e. /usr/local/lib/R/site-library and /usr/lib/R/site-library). I suppose this would take setting one or all of R_LIBS, R_LIBS_SITE, R_LIBS_USER in ~/.Renviron, but that would also affect the Debian R in the system so is not an option. How do R Debianers handle this situation? Cheers, -- Seb
Dirk Eddelbuettel
2010-May-09 21:50 UTC
[R-sig-Debian] running a locally built R-devel with libraries from Debian installation
On 9 May 2010 at 16:33, Sebastian P. Luque wrote: | Hi Dirk, | | On Sun, 9 May 2010 16:04:52 -0500, | Dirk Eddelbuettel <edd at debian.org> wrote: | | [...] | | > /etc/R/ -- and see help(Startup) for the files. All also explained in | > the R Inst. and Admin manual. | | > If you don't have the softlinks from /etc/R/ then it is | | > $whereEver/R/etc/ | | > instead. | | Thanks, I'm familiar with these, but I was referring to the local | R-devel so was hoping for something that didn't involve modifying these | files because they'd get wiped out every time R-devel is rebuilt. | Perhaps there's just no way around that. 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 :) -- Regards, Dirk
Dirk Eddelbuettel
2010-May-10 00:24 UTC
[R-sig-Debian] running a locally built R-devel with libraries from Debian installation
On 9 May 2010 at 18:50, Sebastian P. Luque wrote: | On Sun, 9 May 2010 17:57:40 -0500, | Dirk Eddelbuettel <edd at debian.org> wrote: | | > The Debian package should only set these env vars if these are | > otherwise unset: | | > edd at ron:~> Rscript -e 'print(.libPaths())' ## default [1] | > "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" [3] | > "/usr/lib/R/library" edd at ron:~> R_LIBS_SITE="/tmp" Rscript -e | > 'print(.libPaths())' [1] "/tmp" "/usr/lib/R/library" edd at ron:~> | > R_LIBS_USER="/tmp" Rscript -e 'print(.libPaths())' [1] "/tmp" | > "/usr/local/lib/R/site-library" [3] "/usr/lib/R/site-library" | > "/usr/lib/R/library" edd at ron:~> | | > There may well be a bug lurking somewhere but at leats here I got to | > modify libPaths on the fly. | | > Good enough? | | Great, I guess that's what I'm trying to get at: one would have to start | R-devel with a long string. I thought there would be a way to just do | 'R' or '~/src/R-devel/bin/R' and then have a mechanism in the user | startup files to ensure that Debian site libraries are added only when | using R-devel. Thanks Dirk, that should get me en route! Another possibility is to use ~/.Rprofile and to directly set this as an argument to to the .libPaths() function -- see help(.libPaths). -- Regards, Dirk
Seemingly Similar Threads
- R CMD check --as-cran attempts to hide R_LIBS_USER but fails
- R CMD check --as-cran attempts to hide R_LIBS_USER but fails
- How to go about getting a change in the SPEC file from which R is built on EPEL?
- Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)
- R CMD check --as-cran attempts to hide R_LIBS_USER but fails