Utility Functions for Methods and S-Plus Compatibility
These are internal utilities, currently in the methods package, that either provide some functionality needed by the package (e.g., element matching by name), or add compatibility with S-Plus, or both.
functionBody(fun=sys.function(sys.parent()))allNames(x)getFunction(name, generic=TRUE, mustFind=TRUE, where)el(object, where)elNamed(x, name, mustFind=FALSE)formalArgs(def)Quote(expr)showDefault(object, oldMethods = TRUE)initMethodDispatch(where = topenv(parent.frame()))methodSignatureMatrix(object, sigSlots = c("target", "defined"))
Summary of Functions
the character vector of names (unlike
names(), never returns
- find the object as a function.
el(object, i)is equivalent to
object[i][](and should typically be replaceable by object[[i]]).
get the element of the vector corresponding to name. Unlike the
$operators, this function requires
nameto match the element name exactly (no partial matching).
- Returns the names of the formal arguments of this function.
Is there a function of this name? If
FALSE, generic functions are not counted.
return all the indices of the search list on which a function
FALSE, ignore generic functions.
Utility, used to enable
showmethods to be called by the automatic printing (via
oldMethodscontrols whether old-style print methods are used for this object. It is
TRUEby default if called directly, but
FALSEwhen called from the methods package for automatic printing (to avoid potential recursion).
Turn on the internal method dispatch code. Called on loading
the namespace. Also, if dispatch has been turned off (by calling
.isMethodsDispatchOn(FALSE)---a very gutsy thing to do), calling this function should turn dispatch back on again.
Returns a matrix with the contents of the specified slots as
rows. The slots should be named character strings of the same
length. Basically used to turn the signatures of a
"MethodDefinition"object into a matrix for printing.
- is a synonym of
quote()and considered deprecated.
Looks like there are no examples yet.