This help topic is for R version 1.7.1. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/methods/html/promptMethods.html
promptMethods {methods}R Documentation

Generate a Shell for Documentation of Formal Methods

Description

Generates a shell of documentation for the methods of a generic function.

Usage

promptMethods(f, filename, methods)

Arguments

f

The name of the generic function whose methods are to be documented.

filename

Optional file on which to write the documentation shell. If supplied, it can be the name of a file, a connection, or FALSE.

If FALSE, the text is returned, presumably to be inserted some other documentation file, such as the documentation of the generic function itself (see prompt).

The default file name is the same as the coded topic name for these methods (currently "f-methods.Rd".

methods

Optional methods list object giving the methods to be documented. By default, the first methods object for this generic is used (for example, if the current global environment has some methods for f, these would be documented).

If this argument is supplied, it is likely to be getMethods(f, where), with where some package containing methods for f.

Value

If filename is FALSE, the text generated; otherwise, the name of the file written.

References

The R package methods implements, with a few exceptions, the programming interface for classes and methods in the book Programming with Data (John M. Chambers, Springer, 1998), in particular sections 1.6, 2.7, 2.8, and chapters 7 and 8.

While the programming interface for the methods package follows the reference, the R software is an original implementation, so details in the reference that reflect the S4 implementation may appear differently in R. Also, there are extensions to the programming interface developed more recently than the reference. For a discussion of details and ongoing development, see the web page http://developer.r-project.org/methodsPackage.html and the pointers from that page.

See Also

prompt and promptClass


[Package methods version 1.7.1 ]