tests/testthat/test-zap-empty.R

test_that("empty strings replaced with missing", {
  x <- c("", "a", NA)
  expect_equal(zap_empty(x), c(NA, "a", NA))
})

Try the haven package in your browser

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

haven documentation built on July 10, 2023, 2:04 a.m.