Skip to content

Commit 6ee3b54

Browse files
skim categorical test
1 parent d284412 commit 6ee3b54

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/testthat/test-datasummary_skim.R

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ test_that("basic", {
1414

1515
})
1616

17+
test_that("simple categorical", {
18+
tab <- datasummary_skim(dat, type = "categorical", output = "data.frame")
19+
truth <- structure(list(` ` = c("vs", "", "gear", "", ""), ` ` = c("FALSE", "TRUE", "3", "4", "5"), N = c("18", "14", "15", "12", "5"), `%` = c("56.2", "43.8", "46.9", "37.5", "15.6")), row.names = c(NA, -5L), class = "data.frame", stub_width = 2L, align = "llrr", output_format = "dataframe")
20+
expect_equal(tab, truth)
21+
})
1722

1823
test_that("errors and warnings: numeric", {
1924

0 commit comments

Comments
 (0)