Skip to contents

na_to_null() Replaces all NAs in a vector or list with NULL. Can be useful for lists of function arguments (e.g., when using purrr::pmap()).

null_to_na() Replaces all NULLs in a list with NAs. Returns an atomic vector if unlist = TRUE and a list otherwise.

Usage

na_to_null(x)

null_to_na(x, unlist = FALSE)