[R] packaging standards for rda files?
Jason Turner
jasont at indigoindustrial.co.nz
Thu Dec 11 23:43:56 CET 2003
Paul Johnson wrote:
...
> We used the fine foreign library to bring in an SPSS dataset that was
> about 9 megabytes and I can squeeze it into a much smaller R object
> using compression with
>
> save(ndat, file="NatAnnES2000.rda", compress=T).
...
> how do people
> put in the meta information that appears in the right side of the data()
> output, as in:
>
> Data sets in package '.':
>
> NatAnnES2000
> Data sets in package 'base':
>
> Formaldehyde Determination of Formaldehyde
> HairEyeColor Hair and Eye Color of Statistics Students
> ...
The meta information is from the documentation, such as
help(Formaldehyde). prompt(NatAnnES2000) will create a template .Rd
file in R's working directory for the data frame (their doc standards
are slightly different to functions). Fill in the blanks, and copy to
the man/ subdirectory of your package.
> Are there other attributes that I should specify if I want to package an
> .rda file for other users?
Just documenting it works for me. Rcmd CHECK or R CMD CHECK will
grumble if there's something you've forgotten to document.
> An rda file created in this way will translate across platforms, won't it?
Not sure about the compression; otherwise, yes.
Cheers
Jason
--
Indigo Industrial Controls Ltd.
http://www.indigoindustrial.co.nz
64-21-343-545
jasont at indigoindustrial.co.nz
More information about the R-help
mailing list