View source: R/toolstartmessage.R
toolstartmessage | R Documentation |
This function writes a process start message (what function was called with which arguments) and stores the current
time, so the corresponding call to toolendmessage
can calculate the elapsed time.
toolstartmessage(functionName, argumentValues, level = NULL)
functionName |
The name of the calling function as a string. |
argumentValues |
A list of the evaluated arguments of the calling function. |
level |
This argument allows to establish a hierarchy of print statements. The hierarchy is preserved for the next vcat executions. Currently this setting can have 4 states: NULL (nothing will be changed), 0 (reset hierarchies), "+" (increase hierarchy level by 1) and "-" (decrease hierarchy level by 1). |
A list containing diagnostic information required by toolendmessage
.
Jan Philipp Dietrich, Pascal Führlich
toolendmessage
, vcat
innerFunction <- function() {
startinfo <- madrat:::toolstartmessage("innerFunction", list(argumentsToPrint = 123), "+")
vcat(1, "inner")
madrat:::toolendmessage(startinfo, "-")
}
outerFunction <- function() {
startinfo <- madrat:::toolstartmessage("outerFunction", list(), "+")
vcat(1, "outer")
innerFunction()
madrat:::toolendmessage(startinfo, "-")
}
outerFunction()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.