From ligges at statistik.tu-dortmund.de  Tue Aug 30 20:35:07 2011
From: ligges at statistik.tu-dortmund.de (Uwe Ligges)
Date: Tue, 30 Aug 2011 20:35:07 +0200
Subject: [Rd] sysdata.rda, namespaces and package dependencies
In-Reply-To: <CABdHhvGrOWBSpz2qkg=iWnCEPynQ2PCmvO7oDyi3sWuqVmFigw@mail.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>
	<4E5D1B99.6060609@statistik.tu-dortmund.de>
	<CABdHhvGrOWBSpz2qkg=iWnCEPynQ2PCmvO7oDyi3sWuqVmFigw@mail.gmail.com>
Message-ID: <4E5D2D5B.8000500@statistik.tu-dortmund.de>



On 30.08.2011 19:52, Hadley Wickham wrote:
>>> 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.
>
> Hadley
>

Ahhhh!!!!
Now I understand you are referring to the special name "sysdata.rda" 
that is not to be loaded via data() - I thought you were talking about 
the regular data including process.
That works fine for me as well and then this special data are available 
when the Namespace is loaded already. Have you put that file into 
package/R rather than package/data? Which R version?

Uwe



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