xfun (version 0.4)

try_silent: Try to evaluate an expression silently

Description

An abbreviation of try(silent = TRUE).

Usage

try_silent(expr)

Arguments

expr

An R expression.

Examples

Run this code
# NOT RUN {
library(xfun)
z = try_silent(stop("Wrong!"))
inherits(z, "try-error")
# }

Run the code above in your browser using DataCamp Workspace