try_silent: Try to evaluate an expression silently

Description Usage Arguments Examples

View source: R/utils.R

Description

An abbreviation of try(silent = TRUE).

Usage

1
try_silent(expr)

Arguments

expr

An R expression.

Examples

1
2
3
library(xfun)
z = try_silent(stop("Wrong!"))
inherits(z, "try-error")

yihui/xfun documentation built on Nov. 18, 2018, 4:11 p.m.