tests/testthat/test-genuine-na.R

test_that("genuine missing values are never dropped", {
  csv <- paste(
    c(
      "indicator_id;snapshot_id;period;value",
      "X1;;20200101;1",
      "X1;;20200102;NA",
      "X1;;20200103;3"
    ),
    collapse = "\r\n"
  )

  data <- aradR:::arad_parse_data_response(charToRaw(csv), encoding = "UTF-8")
  expect_equal(nrow(data), 3L)
  expect_true(is.na(data$value[[2]]))
})

Try the aradR package in your browser

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

aradR documentation built on Oct. 15, 2026, 5:08 p.m.