Motivated by functions like
that have multiple layers of internal calls but then eventually go to
evaluate user code. The idea here is to collapse all those intermediate
levels so they don't clutter the profile tree.
a treeprof object
Most of these functions seem to have a common pattern: there is the function
itself that is called, and then at some point, one final function is called
before the user code is evaluated. We capture this by looking for the initial
function, and then within the children of that function, look for the final
function subject to the condition that the final function is not followed by
a disallowed function. This last condition is necessary because some functions
`tryCatch` call themselves in order to register multiple
handlers so we would otherwise think we have exited the function when in
reality we haven't.
Clearly this isn't completely fool proof, especially if someone writes a function with the same name as some of these base passthru functions.
a modified treeprof object
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.