isGeneric
Determine Whether a Function is a Generic

Description

Determines whether a particular function name corresponds to a generic function.

Usage

isGeneric(f, where = topenv(parent.frame()), fdef = NULL, getName = FALSE)

Arguments

f character string, name of the function.
where package or environment to search for the generic function.
fdef This argument is unimplemented, and a warning is generated if it is given.
getName This argument is unimplemented, and a warning is generated if it is given.
Value
a logical value, TRUE if f is the name of a generic function.
See Also
setMethod, setGeneric.
Examples
setGeneric("setG", function(x)standardGeneric("setG"))
setMethod("setG", "numeric", function(x) x^2)
isGeneric("setG") # TRUE

isGeneric("show") # TRUE isGeneric("no-such-function") # FALSE

Package methods version 6.1.4-13
Package Index