test_that("strRemoveEmpty", {
x <- c("", "a", "b", " ", NA_character_)
expect_identical(
object = strRemoveEmpty(x, naOk = TRUE, spacesOk = TRUE),
expected = c("a", "b", " ", NA_character_)
)
expect_identical(
object = strRemoveEmpty(x, naOk = FALSE, spacesOk = FALSE),
expected = c("a", "b")
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.