Skip to content
Prev 9759 / 63424 Next

Documenting classes and methods: was [Rd] Re: R-devel Digest, Vol 3, Issue 23

Correct.
Actually, there are several issues.

If two packages had a 'foo-methods' alias entry, we can still find them
(and in fact, the code in help() does so).  However, for multiple help
topic matches, we typically only display the first one, rather than
offering a selection menu, and I really think we should change this.

Re using 'foo-methods' as an alias, I am not sure whether this is
necessary in the long run.  To find out which methods are available, we
can use showMethod().  We should eventually [see below] be able to do
something like

  method ? f(x="character", y = "numeric")

to access the documentation object for the given signature, and there is
no guarantee that an f-methods Rd object really documents all methods
for the generic f in the package.  So I think eventually we should get
rid of the default foo-methods alias, and just dump the ones
corresponding to available methods.
Right, but perhaps there should still be \usage markup for S4 methods in
case people want to document methods with 'surprising arguments'.  One
idea would be to have

	\S4method{generic}{signaturelist}(arglist)

which could on output render to e.g.

	## Method for signature 'signaturelist':
	generic(arglist)
Definitely.

Best
-k