From xie at yihui.name  Tue Aug 30 17:06:28 2011
From: xie at yihui.name (Yihui Xie)
Date: Tue, 30 Aug 2011 10:06:28 -0500
Subject: [Rd] sysdata.rda, namespaces and package dependencies
In-Reply-To: <CABdHhvES1MW=erb_gTNn1CUop2AmKrNeAp4=HpQpxygk3jm7bw@mail.gmail.com>
References: <CABdHhvHJCstQrsoCWhMTys6Jba5egWO6iprm2TuFy0Zrb==U1Q@mail.gmail.com>
	<CABdHhvES1MW=erb_gTNn1CUop2AmKrNeAp4=HpQpxygk3jm7bw@mail.gmail.com>
Message-ID: <CANROs4e6YrR_v2D5q9NXiKHcgbyWrd0E=2MFZkJCYt=YpMZYYQ@mail.gmail.com>

I struggled with this for a while too, and I have no idea why this
data object is unavailable. Finally I found this can do the trick:

data(munsell_map, package = "munsell")
munsell::mnsl("10B 4/6")
## works

But I still cannot understand this.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Tue, Aug 30, 2011 at 8:27 AM, Hadley Wickham <hadley at rice.edu> wrote:
> Bump. ?Any comments on this?
> Hadley
>
> On Tue, Aug 16, 2011 at 10:53 AM, Hadley Wickham <hadley at rice.edu> wrote:
>> Hi all,
>>
>> I'm struggling with accessing a package dataset (munsell.map, stored
>> in sysdata.rda) when that package is imported, not required. ?A simple
>> reproducible example is:
>>
>> install.packages("munsell")
>> munsell::mnsl("10B 4/6")
>> # Error in match(col, munsell.map$name) : object 'munsell.map' not found
>>
>> library(munsell)
>> munsell::mnsl("10B 4/6")
>> # Function works correctly
>>
>> Am I doing something wrong, or is this namespace bug?
>>
>> Hadley
>>
>> --
>> Assistant Professor / Dobelman Family Junior Chair
>> Department of Statistics / Rice University
>> http://had.co.nz/
>>
>
>
>
> --
> Assistant Professor / Dobelman Family Junior Chair
> Department of Statistics / Rice University
> http://had.co.nz/
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



[Rd] sysdata.rda, namespaces and package dependencies
Yihui Xie