tests/testthat/test-summarise_ndr.R

test_that("summarise_ndr works", {
  expect_identical(
    {
      new <- tx_new(ndr_example)
      summarise_ndr(new, level = "state", names = "tx_new")
    },
    janitor::adorn_totals(dplyr::count(tx_new(ndr_example), ip, state, name = "tx_new"))
  )
})

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.