[Rd] documenting datasets with more than one object

Charles Geyer charlie at stat.umn.edu
Sat Mar 21 22:21:00 CET 2009


I am trying to put an rda (R save image) file that contains multiple R
objects in a contributed package.  From the example of the BJsales data
in package "datasets" it seems this is o. k.  But I am puzzled by some
of what "Writing R Extensions" says.

Section 1.1.3 mentions datalist files.  Do I have to have one in this case?

Section 2.1.2 says

    The \usage entry is always bar or (for packages which do not use
    lazy-loading of data) data(bar). (In particular, only document a
    single data object per Rd file.) 

What does that mean?  I have to describe all of the objects in the file,
but I only "document" one of them?  Is the Rd file for BJsales just wrong?

What if the rda file is sim.rda and so data(sim) is used to load it, but
"sim" is not the name of one of the R objects in rda file?

Is there a better example for how to do this?

My package passes R CMD check but I don't want to ship it to CRAN if it
is doing something considered harmful.
-- 
Charles Geyer
Professor, School of Statistics
University of Minnesota



More information about the R-devel mailing list