Skip to content
Prev 42193 / 63424 Next

R CMD check WARNING \usage question

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