Re: [Rd] R CMD check fails to warn about undocumented classes and methods

From: Martin Maechler <maechler_at_stat.math.ethz.ch>
Date: Fri, 16 Dec 2011 11:02:45 +0100

> On 12/15/2011 03:40 PM, Martin Morgan wrote:
> > In
> >
> > > R.version.string
> > [1] "R Under development (unstable) (2011-12-15 r57901)"
> >
> > PkgA promotes 'unique' to a generic and exports that
> >
> > DESCRIPTION:
> > Imports: methods
> >
> > R/f.R:
> > setGeneric("unique")
> >
> > NAMESPACE:
> > export(unique)
> >
> > and PkgB creates and exports a method on unique
> >
> > DESCRIPTION
> > Imports: methods, PkgA
> >
> > R/f.R:
> > setClass("B", representation(b="numeric"))
> > setMethod(unique, "B",
> > function(x, incomparables=FALSE, ...) unique(x_at_b))
>
> this also has
>
> bunique <- function(b) unique(b)
>
> > NAMESPACE:
> > importFrom(PkgA, unique)
> > exportClasses(B)
> > exportMethods(unique)
>
> and
>
> export(bunique)
>
> >
> > There is a man/ page for each package, but no other documentation. Yet
> >
> > R CMD check PkgA_1.0.tar.gz
> >
> > says
> >
> > * checking for missing documentation entries ... OK
> > * checking for code/documentation mismatches ... OK
> >
> > and for Pkg B we only get
> >
> > * checking for missing documentation entries ... WARNING
> > Undocumented code objects:
> > ‘bunique’
> > All user-level objects in a package should have documentation entries.
> > See the chapter 'Writing R documentation files' in the 'Writing R
> > Extensions' manual.
> > * checking for code/documentation mismatches ... OK
> >
> > Martin Morgan

Thank you, Martin.
I don't have time to delve into this, before Monday, but I agree that things could/should be improved.

Two quick questions/requests:

  1. Is this new in R-2.14.x or R-devel, but does not happen earlier ?
  2. As the 'R-devel' list allows attachments of MIME type application/x-tar application/x-compressed-tar application/x-gzip it would be most convenient to most readers of this list, and notably to R core members, if you included the packages maybe as one *.tar containing the two <pkg>.tar.gz files.

Martin Maechler, ETH Zurich



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 16 Dec 2011 - 10:04:23 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 16 Dec 2011 - 14:30:18 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