Description Usage Arguments Details Value Author(s) See Also Examples
This function can turn on tracing for all methods (or a subset of the methods) of a generic function. It is useful when debugging, as it can help see how the methods are being traversed.
1 2 | traceMethods(generic, traceStrings, tracer)
untraceMethods(generic, methodSigs)
|
generic |
The name of the generic function, quoted or not. |
traceStrings |
A string to print when each method is entered. |
tracer |
A function to insert as the tracer, if missing a function that prints the methods signature is used. |
methodSigs |
A set of method signatures, as a character vector, that tracing will be turned off for. |
traceMethods
uses showMethods
to figure out what methods
exist, and what the signatures are. It then uses trace
to set a trace on
all methods.
untraceMethods
uses the returned value of traceMethods
,
or any other similar construct to untrace methods for a generic.
A vector of method signatures is returned. This could be then used to untrace the methods (something else to automate).
R. Gentleman
1 2 3 4 5 | ## Not run:
traceMethods{slice}
untraceMethods{slice}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.