silently: Silently

View source: R/adverbs.R

silentlyR Documentation

Silently

Description

silently returns a new function that will returns an error or a warning if any, or else returns nothing.

Usage

silently(.f)

Arguments

.f

the function to silence

Value

an error if any, a warning if any. The result is never returned.

Examples

## Not run: 
silent_log <- silently(log)
silent_log(1)
silent_log("a")

## End(Not run)


ColinFay/trycatchthis documentation built on Dec. 31, 2022, 3:59 a.m.