Exclude all NULL Entries from a List
excludeNULL(x)
Arguments
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"
#>