
Generation is done based on specify()
and (if needed) hypothesize()
inputs.
generate(x, reps = 1, type = NULL, ...)GENERATION_TYPES
A data frame that can be coerced into a tibble.
The number of resamples to generate.
Currently either bootstrap
, permute
, or simulate
.
Currently ignored.
A tibble containing rep
generated datasets, indicated by the
replicate
column.
An object of class character
of length 3.
# NOT RUN {
# Permutation test for two binary variables
mtcars %>%
dplyr::mutate(am = factor(am), vs = factor(vs)) %>%
specify(am ~ vs, success = "1") %>%
hypothesize(null = "independence") %>%
generate(reps = 100, type = "permute")
# }
Run the code above in your browser using DataLab