Learn R Programming

stringi (version 1.2.2)

stri_remove_empty: Remove all empty strings from a character vector

Description

This function removes all empty strings from a character vector.

Usage

stri_remove_empty(x, na_empty = FALSE)

Arguments

x

a character vector

na_empty

should missing values be treated as empty strings?

Value

Always returns a character vector.

See Also

Other utils: stri_list2matrix, stri_na2empty

Examples

Run this code
# NOT RUN {
stri_remove_empty(stri_na2empty(c("a", NA, "", "b")))
stri_remove_empty(c("a", NA, "", "b"))
stri_remove_empty(c("a", NA, "", "b"), TRUE)

# }

Run the code above in your browser using DataLab