[R-sig-Debian] Debian Testing: ~/.Renviron seems to not being read (R_LIBS not set)

Dirk Eddelbuettel edd at debian.org
Mon Mar 30 13:39:50 CEST 2015


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



More information about the R-SIG-Debian mailing list