[Rd] sysdata.rda, namespaces and package dependencies

Hadley Wickham hadley at rice.edu
Tue Aug 30 19:52:47 CEST 2011

>> 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.

So how should I include package local data?  The dataset is only used
internally by munsell functions (it's basically a big lookup table)
and should not be available to the user - i.e. it should not be
exported.  This, I thought, was the purpose of sysdata.rda.


Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University

More information about the R-devel mailing list