tests/testthat/test-sum-table.R

test_that("bcat_sum_table works with numeric data", {
  result <- bcat_sum_table(mtcars[, c("mpg", "wt", "hp")], doc_type = "html")
  expect_true(inherits(result, "knitr_kable") || inherits(result, "kableExtra"))
})

test_that("bcat_sum_table works with by grouping", {
  result <- bcat_sum_table(mtcars[, c("mpg", "wt", "cyl")],
                           by = "cyl", doc_type = "html")
  expect_true(inherits(result, "knitr_kable") || inherits(result, "kableExtra"))
})

Try the Rbearcat package in your browser

Any scripts or data that you put into this service are public.

Rbearcat documentation built on March 21, 2026, 5:07 p.m.