Would you suggest a better (briefer or more legible) way of converting NULLs in a list to NAs; and from list to vector?
list(1, 2, 3, numeric(0), 5) %>%
purrr::map_dbl(~ ifelse(length(.) == 0, NA_real_, .))
# [1] 1 2 3 NA 5
I would prefer not using ifelse and instead using if_else.
Is there another way of doing it with purrr?