Nothing
testthat::test_that("`case_weights()` works", {
data(vi)
vi <- vi[1:1000, ]
#binomial weights
weights <- case_weights(
x = vi$vi_binomial
)
testthat::expect_true(
length(unique(weights)) == 2
)
#multinomial weights
weights <- case_weights(
x = vi$vi_categorical
)
testthat::expect_true(
all(names(weights) %in% unique(vi$vi_categorical))
)
testthat::expect_error(
weights <- case_weights(
x = NULL
)
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.