[R] R CMD check

Achim Zeileis zeileis at ci.tuwien.ac.at
Thu Nov 29 17:15:34 CET 2001


Martyn Plummer wrote:
> 
> I have been checking my package coda with the current R-devel
> using "R CMD check".  As usual, this has uncovered a large number
> of errors and inconsistencies in my documentation, for which I
> am very grateful.
> 
> The only problem I have is with code/documentation mismatches when I
> have written a method for a generic function, e.g.
> 
> * checking for code/documentation mismatches ... WARNING
> Objects with usage in documentation object `plot.mcmc' but missing from code:
> [1] "plot"
> 
> Objects with usage in documentation object `summary.mcmc' but missing from
> code:[1] "summary"
> 
> Objects with usage in documentation object `time.mcmc' but missing from code:
> [1] "end"   "start" "time"
> 
> Objects with usage in documentation object `window.mcmc' but missing from code:
> [1] "window"
> 
> This occurs because, for example, I have documented the usage of
> summary.mcmc as
> 
> \usage{
> summary(data, quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)
> }
> 
> I'm being encouraged to document it as
> 
> \usage{
> summary.mcmc(data, quantiles = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)
> }
> 
> but I don't think this is right. Surely the correct usage of a method
> is to call the generic function?

Documenting it as
\method{summary}{mcmc}(data, quantiles = c(0.025, 0.25, 0.5, 0.75,
0.975), ...)
should solve that problem, because then R knows that you're documenting
a method for a generic function.

Best,
Z

 
> Martyn
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list