[Bioc-devel] documentation help

Stefano Berri S.Berri at leeds.ac.uk
Wed Mar 9 13:26:02 CET 2011


Hi.

I want a method that requires an object (obviously) and allows *optional*
arguments

so I set it up like this

setGeneric("gcNorm", function(object, ...){standardGeneric("gcNorm")})

then I started the documentation and wanted to document the optional
arguments

\usage{
gcNorm(object, ...)
}

\arguments{
gcNorm(object, excludeFromGCNorm = character(0), maxNumPoints = 10000, ...)
\item{object}{An object of Class \code{"CNAnorm"}}
\item ...
\item ...
}

but, while running R CMD CHECK I get this warnings

+++++++++++++++++++++++++++++

* checking Rd \usage sections ... WARNING
Undocumented arguments in documentation object 'gcNorm'
  ...
Documented arguments not in \usage in documentation object 'gcNorm':
  excludeFromGCNorm maxNumPoints

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.
+++++++++++++++++++++++++++++

An option could be to add the optional arguments in the definition

setGeneric("gcNorm", function(object, excludeFromGCNorm, maxNumPoints) ... )

but then I guess it looks like I always have to pass them and are not
optional anymore...

what am I not getting right? What is the way to go?

Thanks for your help

Stefano



More information about the Bioc-devel mailing list