getS3method {utils} | R Documentation |
Get a method for an S3 generic, possibly from a name space.
getS3method(f, class, optional = FALSE)
f |
character: name of the generic. |
class |
character: name of the class. |
optional |
logical: should failure to find the generic or a method be allowed? |
S3 methods may be hidden in packages with name spaces, and will not
then be found by get
: this function can retrieve
such functions, primarily for debugging purposes.
The function found, or NULL
if no function is found and
optional = TRUE
.
methods
, get
require(stats)
exists("predict.ppr") # false
getS3method("predict", "ppr")