
Remove empty elements from lists
compact_list(x, remove_na = FALSE)
A list or vector.
Logical to decide if NA
s should be removed.
# NOT RUN {
compact_list(list(NULL, 1, c(NA, NA)))
compact_list(c(1, NA, NA))
compact_list(c(1, NA, NA), remove_na = TRUE)
# }
Run the code above in your browser using DataLab