toolstartmessage {madrat} | R Documentation |
Tool: Start message
Description
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.
Usage
toolstartmessage(functionName, argumentValues, level = NULL)
Arguments
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). |
Value
A list containing diagnostic information required by toolendmessage
.
Author(s)
Jan Philipp Dietrich, Pascal Führlich
See Also
Examples
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()
[Package madrat version 3.6.4 Index]