Nothing
x <- ordered(letters[c(5:15, 2)], levels = letters)
test_that("Sequences correctly", {
expect_equal(fct_expand_seq(x),
ordered(letters[2:15], levels = letters))
expect_equal(fct_expand_seq(x, "g", "s", 3L),
ordered(letters[seq(7, 19, 3)], levels = letters))
expect_equal(fct_expand_seq(x, "g", "s", 3L),
fct_expand_seq(x, "g", "t", 3L))
expect_equal(fct_expand_seq(x, 1),
ordered(letters[1:15], levels = letters))
})
test_that("fct_expand_seq() fails", {
expect_error(fct_expand_seq("a"), class = "simpleError")
expect_error(fct_expand_seq(as.ordered("a"), by = NA), class = "simpleError")
expect_error(
fct_expand_seq(as.ordered("a"), min_lvl = NA),
class = "fctExpandSeqNaError"
)
expect_error(
fct_expand_seq(as.ordered("a"), max_lvl = NA),
class = "fctExpandSeqNaError"
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.