tests/testthat/test-thin.R

test_that("thin", {
  expect_identical(
    thin(nlists(nlist(x = 1L), nlist(x = 2L), nlist(x = 3L), nlist(x = 4L)), nthin = 2),
    structure(list(structure(list(x = 1L), class = "nlist"), structure(list(
      x = 3L
    ), class = "nlist")), class = "nlists")
  )
})
poissonconsulting/nlist documentation built on June 14, 2025, 8:54 p.m.