tests/testthat/test-n_strata.R

test_that("n_strata returns the number of rows equal to the number of strata", {
  n <- nrow(n_strata(d, weights = "w", strata = "s"))
  k <- length(unique(d$s))
  
  expect_equal(n, k)
})
gibonet/vhatbfs documentation built on Sept. 14, 2024, 7:53 a.m.