simpleTimeReport: Time reports

View source: R/time-report.R

simpleTimeReportR Documentation

Time reports

Description

[Experimental] This function can be used to evaluate an expression line-by-line to capture outputs, errors, messages, and evaluation time.

Usage

simpleTimeReport(title = NULL, expr, envir = parent.frame())

Arguments

title

The title to be printed

expr

The expression to run

envir

The environment from which to evaluate the expr

Details

Evaluate code and report on the time difference

Value

A reported_results/list object containing results, outputs, messages, warnings, and errors

Examples

simpleTimeReport("example", {
  print("1")
  Sys.sleep(1)
  warning("this is a warning")
  for (i in 1:5) {
    Sys.sleep(0.5)
  }
  sample(1e6, 1e6, TRUE)
})

jmbarbone/jordan documentation built on April 1, 2024, 7:46 p.m.