From ripley at stats.ox.ac.uk  Tue Jan  8 15:10:14 2008
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 8 Jan 2008 14:10:14 +0000 (GMT)
Subject: [Rd] checking whether the name space can be loaded with stated
 dependencies
In-Reply-To: <f8e6ff050801080545y73fe7857ue7a68b60a2528c73@mail.gmail.com>
References: <f8e6ff050801031831j36005a1cw8449a6f65481845b@mail.gmail.com> 
	<Pine.LNX.4.64.0801040237590.26624@gannet.stats.ox.ac.uk> 
	<f8e6ff050801040615t3469f32cldfe27bedc5539b1@mail.gmail.com> 
	<Pine.LNX.4.64.0801042155140.30877@gannet.stats.ox.ac.uk> 
	<Pine.LNX.4.64.0801080723090.30441@gannet.stats.ox.ac.uk>
	<f8e6ff050801080545y73fe7857ue7a68b60a2528c73@mail.gmail.com>
Message-ID: <Pine.LNX.4.64.0801081356040.7137@gannet.stats.ox.ac.uk>

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



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