tests/testthat/test-summarise_recency.R

test_that("summarise_recency works", {
  expect_identical(
    {
      rtri_recent <- rtri_recent(recency_example)
      summarise_recency(rtri_recent)
    },
    janitor::adorn_totals(dplyr::count(rtri_recent(recency_example), ip, facility_state, name = "rtri_recent"))
  )
})

Try the tidyndr package in your browser

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

tidyndr documentation built on April 8, 2022, 9:06 a.m.