From hadley at rice.edu  Tue Aug 30 19:52:47 2011
From: hadley at rice.edu (Hadley Wickham)
Date: Tue, 30 Aug 2011 12:52:47 -0500
Subject: [Rd] sysdata.rda, namespaces and package dependencies
In-Reply-To: <4E5D1B99.6060609@statistik.tu-dortmund.de>
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>
Message-ID: <CABdHhvGrOWBSpz2qkg=iWnCEPynQ2PCmvO7oDyi3sWuqVmFigw@mail.gmail.com>

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

-- 
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/



[Rd] sysdata.rda, namespaces and package dependencies
Hadley Wickham