From gavin.simpson at ucl.ac.uk  Fri Oct 19 13:39:26 2012
From: gavin.simpson at ucl.ac.uk (Gavin Simpson)
Date: Fri, 19 Oct 2012 12:39:26 +0100
Subject: [Rd] Rcmd_environ and R_LIBS_{USER,SITE}
In-Reply-To: <20608.7608.577340.915403@max.nulle.part>
References: <20606.51152.929307.770692@max.nulle.part>
	<k5odpj$kqp$1@ger.gmane.org> <20608.3682.541568.225279@max.nulle.part>
	<CAC2h7ut6Gm3Bz9h3qUhtpZ7iSs5qDFKinv3kiOfvZVKzb=N3vQ@mail.gmail.com>
	<20608.7608.577340.915403@max.nulle.part>
Message-ID: <1350646766.3967.1.camel@prometheus.geog.ucl.ac.uk>

On Thu, 2012-10-18 at 10:18 -0500, Dirk Eddelbuettel wrote:
> Kasper,
> 
> On 18 October 2012 at 10:41, Kasper Daniel Hansen wrote:
> | I set my user libraries in .Rprofile for this very reason.  I agree it
> | is weird that .Renviron is not always read etc.
> 
> Sorry, no cigar either -- this equivalent to using files in $R_HOME/etc/ and
> is also ignored by R CMD check, which still fails in my setup as it doesn't
> find the package -- whereas any normal R session does.
> 
> Dirk

I have R_LIBS set in my Bash profile (~/.bashrc) for IIRC this very
reason. Can you do the same on Windows?

G

> 
> 
> | 
> | Kasper
> | 
> | On Thu, Oct 18, 2012 at 10:12 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
> | >
> | > Keith,
> | >
> | > On 18 October 2012 at 09:14, Keith Jewell wrote:
> | > | No reply in a number of hours, so here is a suggestion from ignorance :-}
> | > |
> | > | ?Startup refers to a number of other "site and user files to process for
> | >
> | > Thanks, and I know, and use those on Linux (and on 'doze when I use it).  My
> | > question was specifically about 'R CMD foo' which skips some of these by
> | > choice, and which Rcmd_environ appears to overcome, albeit imcompletely. I
> | > still have an issue on Windows where I cannot split my package installations
> | > between those that come and go with R installations, and the others.
> | >
> | > But it is truly bizarre that I can do (on Windows)
> | >
> | >   R CMD INSTALL foo_1.2-3.tar.gz
> | >
> | > and a moment later
> | >
> | >   R CMD check foo_1.2-3.tar.gz
> | >
> | > fails in its tests and examples with "no package called 'foo'"
> | >
> | > Doing 'R CMD check --no-examples --no-tests foo_1.2-3.tar.gz' works, but is
> | > less helpful as we're running the check to run those very tests...
> | >
> | > Dirk
> | >
> | >
> | > | setting environment variables" but not to Rcmd_environ. The contents of
> | > | $R_HOME/etc/Rcmd_environ seem to reflect (some of) the contents of
> | > | (some) other files.
> | > |
> | > | I have similar lines (defining library paths) in
> | > |      $R_HOME/etc/Renviron.site
> | > |
> | > | Is it correct to directly edit Rcmd_environ or should it be modified
> | > | only via other files? (A genuine question).
> | > |
> | > | On 17/10/2012 15:59, Dirk Eddelbuettel wrote:
> | > | >
> | > | > Is there a fundamental reason why I cannot set either one of
> | > | >
> | > | >    ## add local library path -- doesn't work either
> | > | >    R_LIBS_USER="c:/opt/R-library"
> | > | >    R_LIBS_SITE="c:/opt/R-library"
> | > | >
> | > | > in $R_HOME/etc/Rcmd_environ even though I can seemingly set other things here?
> | > | >
> | > | > It breaks "R CMD check" for me as I prefer NOT to install packages in a
> | > | > versioned path.
> | > | >
> | > | > FWIW, defaulting to a versioned path is (to this no-longer-bemused user) as
> | > | > much a permenent R bug (on Windoze) as the default installation into a path
> | > | > with spaces.
> | > | >
> | > | > Dirk
> | > | >
> | > |
> | > | ______________________________________________
> | > | R-devel at r-project.org mailing list
> | > | https://stat.ethz.ch/mailman/listinfo/r-devel
> | >
> | > --
> | > Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
> | >
> | > ______________________________________________
> | > R-devel at r-project.org mailing list
> | > https://stat.ethz.ch/mailman/listinfo/r-devel
> 

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



[Rd] Rcmd_environ and R_LIBS_{USER,SITE}
Gavin Simpson