tests/testthat/test-count_na.R

## Create example data:
x <- c(1, 2, NA, 4, 5, NA)

## Tests on results:
test_that("count_na works well", {
    expect_equal(count_na(x), 2)
})
test_that("count_nonmissing works well", {
    expect_equal(count_nonmissing(x), 4)
})
frederic-santos/rdss documentation built on March 25, 2023, 5:25 p.m.