[Rd] Missing arg default values in Docs are not triggering an 'R CMD check' warning

Hervé Pagès hpages at fhcrc.org
Tue Feb 2 20:30:32 CET 2010


Hi,

Having

   foo <- function(x, y, z) {TRUE}

in my code and

   foo(x, y=NULL, z=0)

in the \usage section of my man page will trigger the
following warning during R CMD check:

* checking for code/documentation mismatches ... WARNING
Codoc mismatches from documentation object 'foo':
foo
   Code: function(x, y, z)
   Docs: function(x, y = NULL, z = 0)
   Mismatches in argument default values:
     Name: 'y' Code:  Docs: NULL
     Name: 'z' Code:  Docs: 0

which is good.

But if the mismatch is the other way around i.e if the argument
default values are specified in Code and not in Docs, then
R CMD check won't say anything. Is that intended or is it a bug?

Thanks,
H.



More information about the R-devel mailing list