tests/testthat/test-separate_p_footnotes.R

skip_on_cran()

gts_tbl <-
  trial %>%
  select(trt, age, grade) %>%
  tbl_summary(by = trt) %>%
  add_p()

test_that("no errors/warnings with standard use", {
  expect_snapshot(separate_p_footnotes(gts_tbl) %>% as.data.frame())
  expect_error(separate_p_footnotes(mtcars))

  expect_error(tbl_split(gts_tbl), NA)
  expect_warning(tbl_split(gts_tbl), NA)
})

Try the gtsummary package in your browser

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

gtsummary documentation built on July 26, 2023, 5:27 p.m.