( I added Kurt + Uwe back here again, they had replied earlier in the thread.)

On 1 December 2006 at 11:27, Prof Brian Ripley wrote:
| On Fri, 1 Dec 2006, Martin Maechler wrote:
| 
| >>>>>> "Dirk" == Dirk Eddelbuettel <[EMAIL PROTECTED]>
| >>>>>>     on Thu, 30 Nov 2006 08:06:46 -0600 writes:
| >
| >       [.............]
| >
| >    Dirk> The boot package loads fine, and is current.  Why does
| >    Dirk> R CMD check think it is an error that boot happens to
| >    Dirk> live in a particular directory, for as long as that
| >    Dirk> directory is known to .libPaths() ?
| >
| > There's quite a difference between
| > .libPaths()  in interactive and in "R CMD check" use :
| >
| > 'R CMD check' does not use your R_ENVIRON where you probably set
| > your R_LIBS .
| 
| That's not the issue here.  Even if R_LIBS is set, R CMD check looks for 
| the copies of the standard and recommended packages in .Library 
| (specifically .check_Rd_xrefs does): that is a safety measure as those are 
| the ones against which the checks should be done even if you have 
| development versions elsewhere in R_LIBS.  (Not my design, but one that 
| seems highly defensible.)

Recall that on Debian (and hence Ubuntu etc), and based on a suggestion by
KH+FL made during DSC2003, we set R_LIBS in the _global_ Renviron file:

[EMAIL PROTECTED]:~> grep R_LIBS /usr/lib/R/etc/Renviron
R_LIBS=${R_LIBS-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'}

So Martin's point about a 'your R_LIBS' does not really hold. It's not via
~/.Renviron that this is governed.

Moreover, I have for several years now configured R itself (aka "r-base-core"
in Debian package space) to build  --without-recommended-packages  so if we put
the two together then a) R knows it cannot assume recommended packages, and
b) every function call using .libPaths() always saw the three values set in
R_LIBS --- which is why on the particular setup I use at work,

        /usr/local/lib/R/site-library   holds "everything", incl rec'd pkgs

        /usr/lib/R/site-library         is empty, no r-cran-* packages here

        /usr/lib/R/library              has what r-base-core installs
                                        but no recommended pkgs either

This has the advantage that the 'littler' shell wrapper update.r will update
everything (in /usr/local/lib/R/site-library) with one simple call; apt-get
and Debian take care of /usr/lib/R/library, and there is no overlap between
R's update.packages() and Debian.  It's more radical than what I tried
before, but it works *great*.

Apart from the R CMD check whine. I think I should patch that, but I'd need a
hint to where I should start looking. 

Or else I have to cave in and put the recommended packages back into
/usr/lib/R/library --- and violate in spirit the implicit contract of leaving
/usr et al to the package management system, and /usr/local to the user. I
don't like breaking that contract.

| There is no provision in the R scripts to install the recommended 
| packages elsewhere than .Library, but I believe Dirk has a post-install 
| script that breaks the assumptions so this is a Debian-packaging-specific 
| issue.

Nothing post-install.  For normal Debian packages, we have 

        r-base-core     
        + recommended pkgs      using           /usr/lib/R/library

        r-cran-* from Debian    using           /usr/lib/R/site-library

        R/user installed pkgs   using           /usr/local/lib/R/site-library

where the last one is the default by virtue of its first place in R_LIBS.
 
| > I vaguely remember that there a good reasons for this behavior,
| > but I don't recall them at the moment.
| 
| R CMD does not make use of ~/.Renviron nor R_HOME/etc/Renviron.site:
| it is like R --vanilla, which is what is used for a lot of batch testing 
| code.

Right, but I had used R_HOME/etc/Renviron, not $R_HOME/etc/Renviron.site
(though arguably "Renviron.site in spirit").

Sorry for the long post, but this question of how to "best" manage R and
Debian packages on Debian/Ubuntu also pops up frequently on the r-sig-debian
list (or, as seen this week, in Doug and my mail box, even from a formerly
prominent CRAN author).

Comments highly welcome!

Cheers from snowy Chicago,  Dirk

-- 
Hell, there are no rules here - we're trying to accomplish something. 
                                                  -- Thomas A. Edison

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

Reply via email to