tests/testthat/test-fill-na.R

test_that("fill_na.nlists", {
  expect_identical(
    fill_na(nlists()),
    nlists()
  )
  expect_identical(
    fill_na(nlists(nlist(x = c(2, NA)), nlist(x = c(NA_real_, NA)))),
    nlists(nlist(x = c(2, 0)), nlist(x = c(0, 0)))
  )
})

Try the nlist package in your browser

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

nlist documentation built on Sept. 5, 2021, 6:05 p.m.