[R] tracing SV3 methods
wdunlap at tibco.com
Wed Mar 11 20:30:08 CET 2009
I would like to put traces on the methods for an SV3 generic
and trace() doesn't seem to work. E.g.,
> median(1:10) # expect "Tracing median.default ..."
I can tell that median.default is getting called, since
a trace on sort() shows it in the traceback:
Tracing function "sort" in package "base"
Tracing sort(x, partial = half + 0L:1L) on entry
list(median(1:10), median.default(1:10), sort(x,
partial = half + 0L:1L), .doTrace(cat(deparse(
sys.calls()), sep = "\n"), "on entry"),
eval.parent(exprObj), eval(expr,p), eval(expr,
Is there a recommended way to do this? (I'd like to put a
trace on all methods of a SV3 generic to see which get called
in various situations.)
This was in R 2.8.1 on Windows but I see the same results
in several versions of R.
TIBCO Software Inc - Spotfire Division
More information about the R-help