View source 
Como lidar com erros quando usando purrr::map
e amigas.
numbers <- list(1, 2, 3, "4")
purrr::map(numbers, purrr::possibly(sqrt, otherwise = NA))
## [[1]]
## [1] 1
##
## [[2]]
## [1] 1.414214
##
## [[3]]
## [1] 1.732051
##
## [[4]]
## [1] NA
Ou
numbers <- list(1, 2, 3, "4")
purrr::map_dbl(numbers, purrr::possibly(sqrt, otherwise = NA))
## [1] 1.000000 1.414214 1.732051 NA