Asks whether a particular function name corresponds to a generic (meaning, usually, whether there are any methods defined for it on any currently attached library). Does NOT guarantee the existence of an explicit methods definition
for the generic (use
metaExists(methodsName(f)) for that).
USAGE:
isGeneric
(
f
,
where
)
REQUIRED ARGUMENTS:
f
Name of the function.
OPTIONAL ARGUMENTS:
where
Database to search. Supply either an object defining a database or a number representing its position in the search path.
VALUE:
Logical value.
SEE ALSO:
,
EXAMPLES:
mysqrt <- sqrt
isGeneric("mysqrt")
## returns F
setMethod("mysqrt", "matrix", function(x) chol(x))
isGeneric("mysqrt")
## returns T