MethodSupport {methods} | R Documentation |
Additional (Support) Functions for Methods
Description
These are support routines for computations on formal methods.
Usage
getMethodsForDispatch(f, fdef)
cacheMethod(f, sig, def, args, fdef)
resetGeneric(f, fdef)
Summary of Functions
resetGeneric
:-
reset the currently defined methods for this generic by removing the corresponding definition from the methods metadata (to be remerged when the function is next called). Returns
TRUE
orFALSE
according to whether information for the function was found in the metadata.You must call this function when you change relevant inheritance information during a session, to guarantee that the new information is used if this generic has already been called.
cacheMethod
:-
Store the definition for this function and signature in the method metadata for the function. Used to store extensions of coerce methods found through inheritance.
No persistent effect, since the method metadata is session-scope only.
getMethodsForDispatch
:-
Get the current methods list object representing the methods for function
f
, merged from the various packages and with any additional caching information stored in theallMethods
slot.If methods have not yet been merged, calling
getMethodsForDispatch
will cause the merge to take place.