| isS3method {utils} | R Documentation |
Checks if method is the name of a valid / registered S3
method. Alternatively, when f and class are specified,
it is checked if f is the name of an S3 generic function and
paste(f, class, sep=".") is a valid S3 method.
isS3method(method, f, class, envir = parent.frame())
method |
a character string, typically of the form
|
f |
optional character string, typically specifying an S3 generic
function. Used, when |
class |
optional character string, typically specifying an S3
class name. Used, when |
envir |
the |
logical TRUE or FALSE
isS3method("t") # FALSE - it is an S3 generic
isS3method("t.default") # TRUE
isS3method("t.ts") # TRUE
isS3method("t.test") # FALSE
isS3method("t.data.frame")# TRUE
isS3method("t.lm") # FALSE - not existing
isS3method("t.foo.bar") # FALSE - not existing