Henrik Bengtsson
on Thu, 27 Jun 2019 16:00:39 -0700 writes:
Using:
untrace(methods::conformMethod)
at <- c(12,4,3,2)
str(body(methods::conformMethod)[[at]])
## language omittedSig <- omittedSig && (signature[omittedSig] != "missing")
cc <- 0L
trace(methods::conformMethod, tracer = quote({
cc <<- cc + 1L
print(cc)
if (cc == 31) { ## manually identified
untrace(methods::conformMethod)
trace(methods::conformMethod, at = list(at), tracer = quote({
str(list(signature = signature, mnames = mnames, fnames = fnames))
print(ls())
try(str(list(omittedSig = omittedSig, signature = signature)))
}))
}
}))
loadNamespace("oligo")
gives:
Untracing function "conformMethod" in package "methods"
Tracing function "conformMethod" in package "methods"
Tracing conformMethod(signature, mnames, fnames, f, fdef, definition)
step 12,4,3,2
List of 3
$ signature: Named chr [1:4] "TilingFeatureSet" "ANY" "ANY" "array"
..- attr(*, "names")= chr [1:4] "object" "subset" "target" "value"
..- attr(*, "package")= chr [1:4] "oligoClasses" "methods" "methods" "methods"
$ mnames : chr [1:2] "object" "value"
$ fnames : chr [1:4] "object" "subset" "target" "value"
[1] "f" "fdef" "fnames" "fsig" "imf"
[6] "method" "mnames" "omitted" "omittedSig" "sig0"
[11] "sigNames" "signature"
List of 2
$ omittedSig: logi [1:4] FALSE TRUE TRUE FALSE
$ signature : Named chr [1:4] "TilingFeatureSet" "ANY" "ANY" "array"
..- attr(*, "names")= chr [1:4] "object" "subset" "target" "value"
..- attr(*, "package")= chr [1:4] "oligoClasses" "methods" "methods" "methods"
Error in omittedSig && (signature[omittedSig] != "missing") :
'length(x) = 4 > 1' in coercion to 'logical(1)'
Error: unable to load R code in package 'oligo'