Marius Hofert
2015-Mar-30 06:24 UTC
[R-sig-Debian] Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)
Hi, I have Debian Testing running on a Lenovo Thinkpad X1 Carbon (2015, 3rd gen.). I would like to have a package library independent of the installed R version. Under Ubuntu, I used to have the following line in ~/.Renviron: R_LIBS=/usr/local/R/library:/usr/lib/R/site-library This worked fine and /usr/local/R/library showed up in .libPaths(). However, under Debian (with the same ~/.Renviron), my .libPaths() just shows "/usr/local/R/R-3.1.3-build/library" which is the version-dependent library (this used to come at 3rd position in .libPaths()). Does R on Debian not look for ~/.Renviron? I also tried R_LIBS_USER but no luck here either (although, as far as I understand Section 6.2 of "R Installation and Administration", R_LIBS or R_LIBS_USER should work (?)) Cheers, Marius PS: I found two sites which seem to be related, but it was still not quite clear to me how to approach the problem: https://stat.ethz.ch/pipermail/r-sig-debian/2005-December/000050.html https://stat.ethz.ch/pipermail/r-sig-debian/2010-May/001146.html
Johannes Ranke
2015-Mar-30 07:13 UTC
[R-sig-Debian] Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)
Hi Marius, Am Montag, 30. M?rz 2015, 02:24:28 schrieb Marius Hofert:> Hi, > > I have Debian Testing running on a Lenovo Thinkpad X1 > Carbon (2015, 3rd gen.).Please specify what version of R you are using and how you installed it.> I would like to have a package library > independent of the installed R version.For this purpose, in the default setup on Debian we have /usr/local/lib/R/site-library. When using the R backport from CRAN on Debian testing this is what you should get: > sessionInfo() R version 3.1.3 (2015-03-09) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Debian GNU/Linux 8 (jessie) ... > .libPaths() [1] "/usr/local/lib/R/site-library" "/usr/lib/R/site-library" "/usr/lib/R/library"> Under Ubuntu, I used to > have the following line in ~/.Renviron: > R_LIBS=/usr/local/R/library:/usr/lib/R/site-library This worked > fine and /usr/local/R/library showed up in .libPaths().This should usually not be necessary, as you can use the default location of the local site library.> However, under Debian (with the same ~/.Renviron), my .libPaths() > just shows "/usr/local/R/R-3.1.3-build/library"It looks like you have done something fairly non-standard to your system... Cheers, Johannes> which is the > version-dependent library (this used to come at 3rd position in > .libPaths()). Does R on Debian not look for ~/.Renviron? I also > tried R_LIBS_USER but no luck here either (although, as far as I > understand Section 6.2 of "R Installation and Administration", > R_LIBS or R_LIBS_USER should work (?)) > > Cheers, Marius > > PS: I found two sites which seem to be related, but it was still > not quite clear to me how to approach the problem: > https://stat.ethz.ch/pipermail/r-sig-debian/2005-December/000050.html > https://stat.ethz.ch/pipermail/r-sig-debian/2010-May/001146.html > > _______________________________________________ > R-SIG-Debian mailing list > R-SIG-Debian at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-debian-- PD Dr. Johannes Ranke Kronacher Str. 8 79639 Grenzach-Wyhlen
Dirk Eddelbuettel
2015-Mar-30 11:39 UTC
[R-sig-Debian] Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)
Hi Marius, On 30 March 2015 at 02:24, Marius Hofert wrote: | I have Debian Testing running on a Lenovo Thinkpad X1 | Carbon (2015, 3rd gen.). I would like to have a package library | independent of the installed R version. Under Ubuntu, I used to | have the following line in ~/.Renviron: | R_LIBS=/usr/local/R/library:/usr/lib/R/site-library This worked | fine and /usr/local/R/library showed up in .libPaths(). Please look at /etc/R/Renviron /usr/lib/R/etc/Renviron (which are the same file via softlinks) and how they set R_LIBS_SITE and have been 2003 (!!). | However, under Debian (with the same ~/.Renviron), my .libPaths() | just shows "/usr/local/R/R-3.1.3-build/library" which is the | version-dependent library (this used to come at 3rd position in | .libPaths()). Does R on Debian not look for ~/.Renviron? I also It should. See help(Startup). And does: edd at max:~$ grep Hello .Renviron MARIUS="Hello, world from .Renviron" edd at max:~$ R -q -e 'Sys.getenv("MARIUS")' R> Sys.getenv("MARIUS") [1] "Hello, world from .Renviron" R> R> edd at max:~$ Small caveat: littler does not (yet). But you didn't say whether you used R or r. Dirk | tried R_LIBS_USER but no luck here either (although, as far as I | understand Section 6.2 of "R Installation and Administration", | R_LIBS or R_LIBS_USER should work (?)) | | Cheers, Marius | | PS: I found two sites which seem to be related, but it was still | not quite clear to me how to approach the problem: | https://stat.ethz.ch/pipermail/r-sig-debian/2005-December/000050.html | https://stat.ethz.ch/pipermail/r-sig-debian/2010-May/001146.html | | _______________________________________________ | R-SIG-Debian mailing list | R-SIG-Debian at r-project.org | https://stat.ethz.ch/mailman/listinfo/r-sig-debian -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Reasonably Related Threads
- Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)
- Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)
- 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
- Customization options with .Renviron, R_LIBS, .Rprofile etc