methods()
finds S3 and S4 methods associated with either the
generic.function
or class
argument. Methods are found in
all packages on the current search()
path. .S3methods()
finds only S3 methods, .S4methods()
finds only only S4 methods. When invoked with the generic.function
argument, the
"byclass"
attribute (see Details) is FALSE
, and the
print
method by default displays the signatures (full names) of
S3 and S4 methods. S3 methods are printed by pasting the generic
function and class together, separated by a ., as
generic.class
. The S3 method name is followed by an asterisk
*
if the method definition is not exported from the package
namespace in which the method is defined. S4 method signatures are
printed as generic,class-method
; S4 allows for multiple
dispatch, so there may be several classes in the signature
generic,A,B-method
.
When invoked with the class
argument, "byclass"
is
TRUE
, and the print
method by default displays the names
of the generic functions associated with the class, generic
.
The source code for all functions is available. For S3 functions
exported from the namespace, enter the method at the command line as
generic.class
. For S3 functions not exported from the
namespace, see getAnywhere
or getS3method
. For S4
methods, see getMethod
.
Help is available for each method, in addition to each generic. For
interactive help, use the documentation shortcut ?
with the
name of the generic and tab completion, ?"generic"
to
select the method for which help is desired.
The S3 functions listed are those which are named like methods
and may not actually be methods (known exceptions are discarded in the
code).