tests/testthat/test_utility.R

context("utility functions")

x = list(a = 5,
         b = 0,
         c = "a",
         d = NULL)

y = list(a = 3,
         b = 7,
         f = NA)

expect_equal(listmerge(x, y, type = "merge")$b, 7)
expect_null(listmerge(x, y, type = "template")$f, NULL)
expect_equal(listmerge(x, NULL, type = "merge"), x)
expect_equal(listmerge(x, list(h = "b"), type = "merge")$h, "b")

Try the attenuation package in your browser

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

attenuation documentation built on Nov. 8, 2019, 9:07 a.m.