tests/testthat/test-data-biontech_adolescents.R

# biontech_adolescents
test_that("biontech_adolescents counts match", {
  expect_equal(biontech_adolescents |> dplyr::filter(group == "vaccine", outcome == "no COVID-19") |> nrow(), 1131)
  expect_equal(biontech_adolescents |> dplyr::filter(group == "placebo", outcome == "COVID-19") |> nrow(), 18)
  expect_equal(biontech_adolescents |> dplyr::filter(group == "placebo", outcome == "no COVID-19") |> nrow(), 1129 - 18)
})
OpenIntroStat/openintro documentation built on June 4, 2024, 4:19 a.m.