Message-ID: <Pine.LNX.3.96.1030812120527.31272D-100000@thorin.ci.tuwien.ac.at>
Date: 2003-08-12T12:10:23Z
From: Torsten Hothorn
Subject: tracing nonstandardGenericFunction
Hi,
how can one trace a nonstandardGenericFunction,
especially "initialize"? An example:
setClass("dummy", representation(a = "numeric"))
setMethod("initialize", "dummy",
function(.Object, a = 2) { ### I want to trace this function
.Object@a <- a
.Object
})
setMethod("show", "dummy", function(object) print(object@a))
b <- new("dummy", a = 3)
trace("show", browser, signature = "dummy") ### trace method "show" to
### class "dummy"
show(b) ### works fine
trace("initialize", browser, signature = "dummy")
R> b <- new("dummy") ### does not trace the function of interest ...
Tracing initialize(value, ...) on entry
Called from: initialize(value, ...)
Best,
Torsten