tests/testthat/test-get_ard_statistics.R

test_that("get_ard_statistics() works", {
  ard <- ard_categorical(ADSL, by = "ARM", variables = "AGEGR1")

  expect_snapshot(
    get_ard_statistics(
      ard,
      group1_level %in% "Placebo",
      variable_level %in% "65-80"
    )
  )

  expect_snapshot(
    get_ard_statistics(
      ard,
      group1_level %in% "Placebo",
      variable_level %in% "65-80",
      .attributes = c("warning", "error")
    )
  )
})

Try the cards package in your browser

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

cards documentation built on Oct. 4, 2024, 1:09 a.m.