tests/testthat/test-calc_summary_stats.R

samples <- data.frame(value = 1:10, type = "car")

test_that("calc_summary_stats works as expected with default arguments", {
  expect_snapshot_output(calc_summary_stats(samples))
})

test_that("calc_summary_stats works as expected when grouping", {
  expect_snapshot_output(calc_summary_stats(samples, summarise_by = "type"))
})

Try the EpiNow2 package in your browser

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

EpiNow2 documentation built on Sept. 26, 2023, 5:11 p.m.