Skip to contents

Remove Empty Elements from Vector of Character

Usage

removeEmpty2(x, dbg = FALSE)

Arguments

x

vector of character

dbg

if TRUE (the default is FALSE) a message about the number of removed elements is printed

Examples

removeEmpty2(c("a", "", "c"))
#> [1] "a" "c"
removeEmpty2(c("a", "", "c", "", "e"), dbg = TRUE)
#> 2 elements removed.
#> [1] "a" "c" "e"