df <- data.frame(
A = c(1,2,3),
B = factor(c("One", "", "Three"), levels = c("One", "", "Three")),
C = factor(c("One", "Two", " "), levels = c("One", "Two", " "))
)
test_that("check_blanks throws an error for blank factors", {
expect_error(check_blanks(df))
})
df <- data.frame(
X = c(1,2,3),
Y = factor(c("One", "Two", "Three"))
)
test_that("check_blanks doesnt throws an error for normal factors", {
expect_null(check_blanks(df))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.