record {rbmi}R Documentation

Capture all Output

Description

This function silences all warnings, errors & messages and instead returns a list containing the results (if it didn't error) + the warning and error messages as character vectors.

Usage

record(expr)

Arguments

expr

An expression to be executed

Value

A list containing

Examples

## Not run: 
record({
  x <- 1
  y <- 2
  warning("something went wrong")
  message("O nearly done")
  x + y
})

## End(Not run)

[Package rbmi version 1.2.6 Index]