Learn R Programming

qreport (version 1.0-1)

timeMar: timeMar

Description

Time an Expression and Report in Quarto Margin

Usage

timeMar(x)

Value

invisibly, the result of the expression

Arguments

x

an expression to execute

Author

Frank Harrell

Details

Function to time an expression, printing the result of base::system.time() in the right margin, and storing the result of system.time in .systime. in the global environment so tha the user can refer to it.

See Also

hooktime()

Examples

Run this code
if (FALSE) {
g <- function(...){}  # define a function to run slowly
result <- timeMar(g())
}

Run the code above in your browser using DataLab