Learn R Programming

genvar (version 0.0.2.0)

capture: captures an expression, returning TRUE if there was an error and FALSE otherwise

Description

captures an expression, returning TRUE if there was an error and FALSE otherwise

Usage

capture(expr, silent = FALSE)

Arguments

expr

an expression to be evaluated

silent

if TRUE, suppress error messages from printing (default: FALSE)

Value

FALSE if the expression successfully ran and TRUE otherwise

Examples

Run this code
# NOT RUN {
capture({log(1)})
capture({log(-1)})
# }

Run the code above in your browser using DataLab