Trace a Method

DESCRIPTION:

Traces the method for generic function f for the specified signature. The remaining arguments are the same as for function trace because traceMethod actually uses trace.

A call to traceMethod is effectively a call to setMethod. The difference is that traceMethod finds the current method, applies the ordinary trace to this method, and then sets the traced function to override the current method, but only in the session database, not on the working data. So as long as the trace remains in effect, the method search will find and use the tracing version.

USAGE:

traceMethod ( what , signature , ... )

REQUIRED ARGUMENTS:

what
Name of the generic function.

OPTIONAL ARGUMENTS:

signature
Signature of the method to trace.
...
Same arguments (after the first, what) as for function trace.

VALUE:

The method, returned invisibly.

SEE ALSO:

EXAMPLES:

traceMethod("whatis", "matrix", exit=browser)