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)
})

Try the openintro package in your browser

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

openintro documentation built on June 22, 2024, 7:37 p.m.