trim_list | R Documentation |
Removes NULL
and empty lists from a list recursively.
trim_list(x)
x |
List. |
x <- list(
NULL,
list(),
list(list(TRUE, list())),
list(NULL, NULL, list()),
1,
list(2, NULL),
df = data.frame(a = 1, b = 2),
integer(),
list(integer())
)
str(trim_list(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.