[Rd] documented but missing from the code (PR#1054)

Kurt Hornik Kurt.Hornik@ci.tuwien.ac.at
Wed, 15 Aug 2001 22:00:38 +0200


>>>>> ripley  writes:

> On Wed, 15 Aug 2001 pgilbert@bank-banque-canada.ca wrote:
>> In R-devel (Aug 15) I am getting some warnings
>> "Objects documented but missing from the code:"
>> 
>> The ones I have checked are definitely in the code, so I suspect there is a bug in
>> this check. I'm very busy today and then away until after the projected release of
>> the new version so I cannot follow up on this as carefully as I would like to. I
>> expect the problem is reproducible with dse from CRAN, though I have been testing
>> with my own working copy.

> Until very recently this was true for objects in zzz.R. One example in
> dse is scale.default, which is not in the code and is in the
> documentation (incorrectly). Generated objects are (correctly) marked
> as not in the code.

> R-devel does not have a projected release date, and is not the next
> version planned (1.3.1 on August 31).  I'd guess its release is
> several months off.

> BTW, is it you who is responsible for the scale generic in R?  dse has

>       scale <- function(x, ..., scale = TRUE) UseMethod("scale")

> as R did, and that is incompatible with scale.default (and hence S's
> scale) which does not have a ... argument.  Adding one forces the
> scale argument to be named and breaks a lot of ported code.

> Your own scale methods are also incompatible with your own generic.
> Try running checkMethods().

I have only tried a random sample of the warnings: e.g., dse2 has one
about `combine'.  This comes from the usage in combine.forecast.cov.Rd
being

    combine(obj1, obj2)

whereas the file actually documents the topics

\alias{combine.forecast.cov}
\alias{combine.forecast.cov.estimators.wrt.data}
\alias{combine.forecast.cov.estimators.wrt.true} 

and there is no object `combine' in the package:

hornik@mithrandir:~/tmp/dse.Rcheck/dse2/R$ grep combine *
combine.forecast.cov.estimators.wrt.data <- function(e1,e2)
combine.forecast.cov.estimators.wrt.true <- function(e1,e2)
combine.forecast.cov <- function(e1,e2)

So I would think that \usage documents an object that is missing from
the code.

-k

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._