[Rd] checking whether the name space can be loaded with stated dependencies

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 8 15:10:14 CET 2008


On Tue, 8 Jan 2008, hadley wickham wrote:

> On Jan 8, 2008 1:31 AM, Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
>> Hadley sent me the package, and my guess *was* correct.  The package is
>> not using lazy-loading, and early on it has (in aaa-top-level.r)
>>
>> TopLevel <- proto(expr = {
>> ...
>>
>> That is 'a top-level computation'.  To make this work, you need
>> require("proto") in that file.  It also needs require("grid").
>
> Thanks for looking into it.  I must have misinterpreted:
>
>  The R code files should only create R objects and not call functions
>  with side effects such as require and options.
>
> because isn't that expression creating an R object?

Only if package proto is attached.  Not my wording, and it long predates 
saved images and lazyloading.

> And something in R CMD check must have changed recently because that 
> code has been there as long as ggplot2 has.

But you set 'LazyLoad: no' since the CRAN version.  That's the problem -- 
the environment when creating an image is richer than when loading a 
namespace.

>  Regardless, thanks again for the help
> as I never would have found that given that my understanding of the
> problem was clearly flawed.
>
> Thanks,
>
> Hadley
>
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-devel mailing list