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 isotherwise
. Inotherwise
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.
Comments closed