Exclude all NULL Entries from a List

excludeNULL(x)

Arguments

x

a list

Value

list x with all NULL entries excluded

Examples

L <- list(a = 1, b = NULL, c = "three") L
#> $a #> [1] 1 #> #> $b #> NULL #> #> $c #> [1] "three" #>
excludeNULL(L)
#> $a #> [1] 1 #> #> $c #> [1] "three" #>