[Rd] Depending/Importing data only packages
Hadley Wickham
h.wickham at gmail.com
Sat Dec 7 21:35:53 CET 2013
> I don't know whether the author of that note would consider it spurious or
> not. A simple workaround for you (as the author of hflights) is to put a
> function into the namespace. For example, get_hflights(), that gets a copy
> of the data:
>
> get_hflights <- function() {
> data("hflights", package="hflights", envir=environment())
> hflights
> }
Another option is to put it in sysdata.rda and then export it - but
then (I think) you don't get the nice lazy loading. It would be nice
to have some official guidance on what is preferred.
Hadley
--
http://had.co.nz/
More information about the R-devel
mailing list