A small helper that turns the NULLs in a list (e.g. missing
fields in a parsed JSON/Python response) into NA, returning a simplified
vector.
Value
A vector with each NULL replaced by NA, simplified by sapply().
Examples
null2na(list(1, NULL, 3))
#> [1] 1 NA 3