[Rd] sysdata.rda, namespaces and package dependencies

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Aug 30 19:19:21 CEST 2011



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



More information about the R-devel mailing list