man/try_silent.Rd
raw| 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/utils.R |
| 3 | \name{try_silent} |
| 4 | \alias{try_silent} |
| 5 | \title{Try to evaluate an expression silently} |
| 6 | \usage{ |
| 7 | try_silent(expr) |
| 8 | } |
| 9 | \arguments{ |
| 10 | \item{expr}{An R expression.} |
| 11 | } |
| 12 | \description{ |
| 13 | An abbreviation of \code{try(silent = TRUE)}. |
| 14 | } |
| 15 | \examples{ |
| 16 | library(xfun) |
| 17 | z = try_silent(stop("Wrong!")) |
| 18 | inherits(z, "try-error") |
| 19 | } |