Last chance! 50% off unlimited learning
Sale ends in
Add within factors
add_within(.data, .by = NULL, ...)
data frame
the data frame
the grouping column (groups by row if NULL)
the names and levels of the new factors
add_random(subj = 2, item = 2) %>%
add_within("subj", time = c("pre", "post"))
Run the code above in your browser using DataLab