From charlie at stat.umn.edu  Sat Mar 21 22:21:00 2009
From: charlie at stat.umn.edu (Charles Geyer)
Date: Sat, 21 Mar 2009 16:21:00 -0500
Subject: [Rd] documenting datasets with more than one object
In-Reply-To: <mailman.19.1237633205.16201.r-devel@r-project.org>
References: <mailman.19.1237633205.16201.r-devel@r-project.org>
Message-ID: <20090321212100.GA16232@stat.umn.edu>

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



[Rd] documenting datasets with more than one object
Charles Geyer