Skip to contents

Remove Empty Elements from Vector

Usage

removeEmpty(x)

Arguments

x

vector

Value

x with elements for which isNaOrEmpty is

TRUE removed

Examples

removeEmpty(c(1, NA, 3))
#> [1] 1 3
removeEmpty(c("a", "", "b", NA, "c", " ", "d"))
#> [1] "a" "b" "c" "d"