# To replace errors with a default value, use possibly().
list("a", 10, 100) |>
map_dbl(possibly(log, NA_real_))
# The default, NULL, will be discarded with `list_c()`
list("a", 10, 100) |>
map(possibly(log)) |>
list_c()
Run the code above in your browser using DataLab