tests/testthat/test-tbl_butcher.R

skip_on_cran()

test_that("tbl_butcher()", {
  tbl <- trial |>
    tbl_uvregression(y = age, method = lm)

  expect_true(
    object.size(tbl) > object.size(tbl_butcher(tbl))
  )

  expect_equal(
    tbl_butcher(tbl, "inputs") |> names(),
    c("table_body", "table_styling", "inputs")
  )
})

Try the gtsummary package in your browser

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

gtsummary documentation built on April 3, 2025, 10:18 p.m.