attempt (version 0.3.1)

surely: surely

Description

Wrap a function in a try

Usage

surely(.f)

Arguments

.f

the function to wrap

Value

an error if any, a warning if any, the result if any

Examples

Run this code
# NOT RUN {
sure_log <- surely(log)
sure_log(1)
sure_log("a")
# }

Run the code above in your browser using DataLab