Skip to content
Prev 10381 / 63424 Next

setClass question

The "undocumented methods" part of this one is easily fixed: undoc() was
calling getMethods() to get the methods defined.  But this gets _all_
the visible methods of the generic, hence everyone was being charged for
everyone else's methods.  Instead, undoc() should call the function
getMethodsMetaData(); it gets, as its name suggests, only the metadata
describing the methods assigned in this environment.

(The documentation for getMethods() describes itself correctly, but I'll
add a note pointing to getMethodsMetaData.)

The extra function warnings are a little subtler to suppress.  The right
approach seems to be to ignore generic functions that "correspond to" a
nongeneric in another package.  The subtlety is defining "correspond
to": intuitively, the generic should have been derived from the
nongeneric by a setGeneric() call, direct or implicit.  We can check
this by comparing the default method to the nongeneric function.

Meanwhile, I will commit the fix for undocumented methods after running
the checks.

John
Roger Koenker wrote: