A wrapper for purrr::imap()
and furrr::future_imap()
that bypasses errors and potentially retries them
safe_imap.Rd
Uses purrr::safely()
and unpacks the results and errors. Also useful for debugging with a breakpoint
Arguments
- .x
object to iterate over, as in
purrr::imap()
- .f
a function, as in
purrr::imap()
- ...
additional arguments to .f, as in
purrr::imap()
- retries
Number of times to retry any errors. Default 0 (just try once). Retries only make sense if errors are intermittent for some reason (network connectivity, etc)
- parallel
Run in parallel with
furrr::future_imap()
(TRUE
) or sequentially withpurrr::imap()
(FALSE
, default)