Re: [Rd] R CMD check WARNING \usage question

From: Bryan Hanson <hanson_at_depauw.edu>
Date: Fri, 06 Jan 2012 14:38:55 -0500

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:

> I'm trying to update a package and would like to crush a WARNING message for a clean build.
>
> I've been struggling with this question and haven't gotten any traction on the web either.
>
> I've got a document file (Rd) that contains the following \usage statement:
>
> \name{sample.data}
> \alias{sample.data}
>
> \title{CONIFERS forest growth model sample data}
>
> \description{ A list object of type \code{sample.data} stores all of
> the basic information about a \code{\link{data.frame}} object
> representing a sample of plants.}
>
> \usage{
> x <- list( plots=data.frame(), plants=data.frame(), age=0, x0=0.0, n.years.projected=0 )
> class(x) <- "sample.data"
> }
>
> When I run R CMD check [pkg], I get the following WARNING:
>
> * checking Rd \usage sections ... WARNING
> Assignments in \usage in documentation object 'sample.data':
> x <- list(plots, plants, age = 0, x0 = 0, n.years.projected = 0)
> class(x) <- "sample.data"
>
> Functions with \usage entries need to have the appropriate \alias
> entries, and all their arguments documented.
> The \usage entries must correspond to syntactically valid R code.
> See the chapter 'Writing R documentation files' in manual 'Writing R
> Extensions'.
> * checking Rd contents ... OK
>
> I'm not sure if there's a problem with the \alias section or the \usage section or both sections (I'm assuming this is the case).
>
> I've read the Chapter 2 of R-ext.pdf plenty and just can't seem to see where I'm blowing it.
>
> Respectfully,
> Jeff.
>
>
> Jeff Hamann, PhD
> PO Box 1421
> Corvallis, Oregon 97339-1421
> 541-754-2457
> jeff.hamann[at]forestinformatics[dot]com
> jeff.d.hamann[at]gmail[dot]com
> http://www.forestinformatics.com
> http://en.wikipedia.org/wiki/Forest_informatics
>
> To ensure that your email is processed, include a subject entry in your email.
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 06 Jan 2012 - 20:02:17 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 Jan 2012 - 20:20:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive