View source: R/strRemoveEmpty.R
strRemoveEmpty | R Documentation |
Remove empty strings
strRemoveEmpty(x, naOk = TRUE, spacesOk = TRUE)
x |
|
naOk |
|
spacesOk |
|
character
.
Modified vector, with empty strings removed.
Updated 2023-09-28.
stringi::stri_remove_empty()
.
x <- c("", "a", "b", " ", NA)
y <- strRemoveEmpty(x, naOk = TRUE, spacesOk = TRUE)
print(y)
y <- strRemoveEmpty(x, naOk = FALSE, spacesOk = FALSE)
print(y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.