error_proof: Run functions safely

Description Usage Arguments Value Examples

View source: R/error_proof.r

Description

Run functions safely

Usage

1
error_proof(x, return_na = FALSE)

Arguments

x

A function.

return_na

Logical, true to return NA when function fails, FALSE to return nothing.

Value

The output x when x runs succesfully. When x is unsuccessful, returns NA when return_na is TRUE, otherwise NULL..

Examples

1
error_proof(mean("a"), return_na=TRUE)

lina2497/webscrapeR documentation built on Nov. 15, 2019, 1:48 p.m.