Skip to content

R CMD check WARNING \usage question

5 messages · Jeff D. Hamann, Bryan Hanson, Duncan Murdoch

#
Jeff, quick question: is this a data set or a function you are documenting?  What you say sounds like it's data, but the Rd file reads more like a function.  Or are you trying to document a data format/object which stores specific data sets?

Let us know, and I'll bet the answer will appear pretty quickly. Bryan

***********
Bryan Hanson
Professor of Chemistry & Biochemistry
DePauw University
On Jan 6, 2012, at 2:11 PM, Jeff Hamann wrote:

            
#
On 12-01-06 2:48 PM, Jeff Hamann wrote:
You are documenting "sample.data", according to the name and alias.  But 
you create an object called "x".  There is no object (function or data) 
called "sample.data".  It's the name of an S3 class.

Now, there isn't a \docType setting for documenting an S3 class; they 
are usually documented along with the function that produces them.  So 
the easiest thing to do is probably to create a function (called 
sample.data, if you like) that produces the object, and document its usage.

Alternatively, don't use Rd for your documentation, write a vignette. 
But that's a lot more work.

Or create a prototype sample.data object (which is what your x looks 
like, being mostly empty), and document it using \docType{data}.  Move 
the code from your \usage section to \examples.

Duncan Murdoch