[Rd] Help for methods

From: hadley wickham <h.wickham_at_gmail.com>
Date: Mon 18 Sep 2006 - 15:24:27 GMT

Help for help says:

The 'topic' argument may also be a function call, to ask for

          documentation on a corresponding method.  See the section on
          method documentation.


     The authors of formal ('S4') methods can provide documentation on
     specific methods, as well as overall documentation on the methods
     of a particular function.  The '"?"' operator allows access to
     this documentation in three ways.


     There are two different ways to look for documentation on a
     particular method.  The first is to supply the 'topic' argument in
     the form of a function call, omitting the 'type' argument. The
     effect is to look for documentation on the method that would be
     used if this function call were actually evaluated. See the
     examples below.  If the function is not a generic (no S4 methods
     are defined for it), the help reverts to documentation on the
     function name.

Which doesn't explicitly mention whether this will work for S3 either way, but the results from:

?summary(lm(wt ~ mpg, data=mtcars)

seem to indicate that it doesn't (at least in my R2.3.0, which is out of date, but I did also search the latest NEWS file for anthing mentioning help). Would it be possible to extend this method to deal with S3 classes as well?


R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Tue Sep 19 01:25:55 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 19 Sep 2006 - 13:30:09 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.