error_proof: error_proof

Description Usage Arguments Value

View source: R/error_proof.r

Description

This code allows you to run code safely within a loop or vectorised without errors breaking the operation. Should an error occur, the error message will be printed to the console and NA returned.

Usage

1
error_proof(x, return_na = FALSE)

Arguments

x

The function/code chunk you which to safely run

return_na

Logical indicating whether ot not to return NA upon error.

Value

The output of the code chunk if successful, or NA if an error occurs.


lina2497/alextools documentation built on June 7, 2020, 10:29 a.m.