Press "Enter" to skip to content

Error Handling in R with purrr

Ariel Muldoon shows off a couple of helpful functions in R’s purrr library:

The possibly() function is a wrapper function. It wraps around an existing function. Other than defining the function to wrap, the main argument of interest is otherwise. In otherwise we define what value to return if we get an error from the function we are wrapping.

Read the whole thing. H/T R-Bloggers.