add_within {faux}R Documentation

Add within factors

Description

Add within factors

Usage

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

Arguments

.data

the data frame

.by

the grouping column (groups by row if NULL)

...

the names and levels of the new factors

Value

data frame

Examples

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

[Package faux version 1.2.1 Index]