tests/testthat/test-filter-icd10.R

context("filtering on ICD-10 validity")

pts <- icd10_all_ahrq
pts[1, "icd10_code"] <- "invalid"

test_that("filter an invalid row", {
  expect_warning(res <- icd10_filter_invalid(pts), regexp = NA)
  expect_is(res, "data.frame")
})

Try the icd package in your browser

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

icd documentation built on July 2, 2020, 4:07 a.m.