tests/testthat/test-fill_value.R

test_that("fill_value works", {
  expect_equal(fill_value(c(NA,1), 2), c(2, 1))
  expect_equal(fill_value(c(NA, NA, 5), 5), c(5, 5 ,5))
})

test_that("fill_value error", {
  expect_error(fill_value(c(NA, 0)))
})

Try the vvfiller package in your browser

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

vvfiller documentation built on Feb. 16, 2023, 6:55 p.m.