powered by
Add between factors
add_between(.data, .by = NULL, ..., .shuffle = FALSE, .prob = NULL)
data frame
the data frame
the grouping column (groups by row if NULL)
the names and levels of the new factors
whether to assign cells randomly or in "order"
probability of each level, equal if NULL
add_random(subj = 4, item = 2) %>% add_between("subj", condition = c("cntl", "test")) %>% add_between("item", version = c("A", "B"))
Run the code above in your browser using DataLab