From ligges at statistik.tu-dortmund.de  Tue Aug 30 19:19:21 2011
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Tue, 30 Aug 2011 19:19:21 +0200
Subject: [Rd] sysdata.rda, namespaces and package dependencies
In-Reply-To: <4E5D1700.407@gmail.com>
References: <CABdHhvHJCstQrsoCWhMTys6Jba5egWO6iprm2TuFy0Zrb==U1Q@mail.gmail.com>
	<CABdHhvES1MW=erb_gTNn1CUop2AmKrNeAp4=HpQpxygk3jm7bw@mail.gmail.com>
	<4E5CF273.5060309@gmail.com>
	<CABdHhvG2tKmGGBwuh+khFHCFWXBmFePOCnAyyBVS=8jU_H3oVA@mail.gmail.com>
	<4E5D1700.407@gmail.com>
Message-ID: <4E5D1B99.6060609@statistik.tu-dortmund.de>



On 30.08.2011 18:59, Duncan Murdoch wrote:
> On 30/08/2011 11:27 AM, Hadley Wickham wrote:
>> > Your package is doing something weird, so I think it's you: you are
>> loading
>> > the munsell.map file via "load.r" in the top level of the package.
>> That's
>> > not a standard thing to do, and it's not being executed in the first
>> case.
>> >
>> > Put that load statement into one of the files in the R directory and
>> things
>> > should be fine.
>>
>> I think that's a red-herring - load.r is for development and is never
>> run during usual package installation. Or are you saying I need to
>> explicit load data stored in sysdata.rda within the package?
>>
>
> Sorry, I didn't realize you weren't executing that file. (Should it be
> included in the tar? That's a different issue...)
>
> Lazy data is stored in a separate file that is loaded when
> library(munsell) is called. It appears it isn't being loaded when you
> only use munsell::mnsl to load it but not attach it. Certainly loading
> it from one of your .R files would work; I'm not sure if it is
> intentional that this is necessary or not. Perhaps someone else will
> comment?

This is expected. The data object is not exported from the Namespace and 
hence not loaded if a reference to the Namespace is made without 
*attaching* the package. Hence data(..., package=...) is the way to go.

Uwe





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



[Rd] sysdata.rda, namespaces and package dependencies
Uwe Ligges