Nothing
context("Testing bootstrap.R")
test_that("test stratSample", {
f <- as.factor(c(1,1,1,2,4,4,4,4,6,6)) # contains also a stratum with only one entry -> important to check sample!
expect_error(stratSample(c(1,2,2,1,45)), "f has to be a factor variable.")
for(i in 1:10) # repeat sampling 10 times
expect_equal(table(f, dnn = NULL), table(f[stratSample(f)], dnn = NULL)) # dnn: no names for variable that is 'tabled'
})
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.