powered by
Recode a categorical column
add_recode(.data, .col, .newcol = paste0(col, ".c"), ...)
data frame with new fixed effects columns
the data frame
the column to recode
the name of the recoded column (defaults to col.c)
coding for categorical column
add_random(subj = 4, item = 4) %>% add_between("subj", cond = c("cntl", "test")) %>% add_recode("cond", "cond.t", cntl = 0, test = 1)
Run the code above in your browser using DataLab