From jari.oksanen at oulu.fi  Thu Jan 17 09:55:17 2013
From: jari.oksanen at oulu.fi (Jari Oksanen)
Date: Thu, 17 Jan 2013 08:55:17 +0000
Subject: [Rd] R CMD check not reading R_LIBS from ~/.R/check.Renviron
In-Reply-To: <1358367214.4687.43.camel@chrysothemis.geog.ucl.ac.uk>
References: <1358367214.4687.43.camel@chrysothemis.geog.ucl.ac.uk>
Message-ID: <66C03CD1145C95448A4D73676DD9C2ED3F7056@nippu1.univ.yo.oulu.fi>

Gav,

This is off-list since I only wonder what you are trying to do. It seems to me that you're trying something much too elegant and complicated. One thing that I have learnt to avoid is muck up with environments: that is calling trouble. One day they will change R and you will get errors that are very difficult to track (I had that once with gnome: I did not edit the config file manually, but only used configuration GUI tools, but then gnome changed and I could not start X11 after distro upgrade -- and it was difficult to track the reason).

What I do with R-devel and R release co-existence is that I keep them completely separate. I do  not install (make install) R-devel, but I leave it in its working directory. I have now a symbolic link in ~/bin ($HOME/bin):

cd ~/bin
ln -s ~/R-devel/bin/R R3

So when I want to run R 3.0.0 I use 'R3' and when I want to use stock R of my distro (no 2.15.1) use R. These are completely different beasts, and packages are installed separately for each so that they are 3.0.0 version in R3 and 2.15 versions in R. I don't edit environments, but always use defaults.

With this setup, analogue checks up smoothly with only comment coming from examples:

* checking differences from ?analogue-Ex.Rout? to ?analogue-Ex.Rout.save? ...
2c2
< This is vegan 2.1-23
---
> This is vegan 2.0-5
1104d1103
< Warning: argument 'tol.dw' is not used (yet)
4894d4892
< Warning: argument 'tol.dw' is not used (yet)
4933d4930
< Warning: argument 'tol.dw' is not used (yet)
6139d6135
< Warning: argument 'tol.dw' is not used (yet)
7078d7073
< Warning: argument 'tol.dw' is not used (yet)
7116d7110
< Warning: argument 'tol.dw' is not used (yet)
 OK

Cheers, Jari


________________________________________
From: r-devel-bounces at r-project.org [r-devel-bounces at r-project.org] on behalf of Gavin Simpson [gavin.simpson at ucl.ac.uk]
Sent: 16 January 2013 22:13
To: R Devel Mailing List
Subject: [Rd] R CMD check not reading R_LIBS from ~/.R/check.Renviron

Dear List,

Further to my earlier email, I note that, for me at least, R CMD check
is *not* reading R_LIBS from ~/.R/check.Renviron on R 2.15.2 patched
(r61228) and R Under Development (r61660). The only way I can get R CMD
check to look for packages in a user-supplied library is by explicitly
exporting R_LIBS set to the relevant directory.

R CMD build *does* read R_LIBS from ~/.R/build.Renviron for the same
versions of R on the same Fedora 16 laptop. So I am in the strange
situation of being able to build but not check a source package having
followed the instructions in Writing R Extensions.

I have tried exporting R_CHECK_ENVIRON via

    export R_CHECK_ENVIRON=/home/gavin/.R/check.Renviron

and that doesn't work either.

~/.R/check.Renviron contains:

R_LIBS=/home/gavin/R/libs/
#R_LIBS=/home/gavin/R/devlibs/

Anyone suggest how/where I am going wrong?

More complete system info follows below.

TIA

Gavin

> sessionInfo()
R version 2.15.2 Patched (2012-12-05 r61228)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.utf8       LC_NUMERIC=C
 [3] LC_TIME=en_GB.utf8        LC_COLLATE=en_GB.utf8
 [5] LC_MONETARY=en_GB.utf8    LC_MESSAGES=en_GB.utf8
 [7] LC_PAPER=C                LC_NAME=C
 [9] LC_ADDRESS=C              LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
[7] base

> sessionInfo()
R Under development (unstable) (2013-01-16 r61660)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_GB.utf8       LC_NUMERIC=C
 [3] LC_TIME=en_GB.utf8        LC_COLLATE=en_GB.utf8
 [5] LC_MONETARY=en_GB.utf8    LC_MESSAGES=en_GB.utf8
 [7] LC_PAPER=C                LC_NAME=C
 [9] LC_ADDRESS=C              LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods
[7] base
--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 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
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%

______________________________________________
R-devel at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] R CMD check not reading R_LIBS from ~/.R/check.Renviron
Jari Oksanen