Description Usage Arguments Examples
Convert all the NULL
elements of list to NA
s
using nulls_to_nas
. The unlist_with_nas
function
is an equivalent of unlist
that replaces
all the NULL
entries with NA
's instead of
dropping them. Function drop_nulls
non-recursively
removes the NULL
entries of a list.
1 2 3 4 5 | nulls_to_nas(x, null = NA)
unlist_with_nas(x, null = NA)
drop_nulls(x)
|
x |
a list. |
null |
the replacement value for |
1 2 3 4 5 6 | lst <- list(1, 2, NULL, 3, 4:6, list(NULL, 7, 8), as.list(9:11))
names(lst) <- letters[seq_along(lst)]
nulls_to_nas(lst)
unlist_with_nas(lst)
drop_nulls(lst)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.