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 May 29, 2024, 10:05 a.m.