Flash Sale | 50% off

Last chance! 50% off unlimited learning

Sale ends in


faux (version 1.2.1)

add_within: Add within factors

Description

Add within factors

Usage

add_within(.data, .by = NULL, ...)

Value

data frame

Arguments

.data

the data frame

.by

the grouping column (groups by row if NULL)

...

the names and levels of the new factors

Examples

Run this code
add_random(subj = 2, item =  2) %>%
  add_within("subj", time = c("pre", "post"))

Run the code above in your browser using DataLab