try_silent: Try to evaluate an expression silently

View source: R/utils.R

try_silentR Documentation

Try to evaluate an expression silently

Description

An abbreviation of try(silent = TRUE).

Usage

try_silent(expr)

Arguments

expr

An R expression.

Examples

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

xfun documentation built on Nov. 17, 2022, 1:06 a.m.