add_recode {faux} | R Documentation |
Recode a categorical column
Description
Recode a categorical column
Usage
add_recode(.data, .col, .newcol = paste0(col, ".c"), ...)
Arguments
.data |
the data frame |
.col |
the column to recode |
.newcol |
the name of the recoded column (defaults to col.c) |
... |
coding for categorical column |
Value
data frame with new fixed effects columns
Examples
add_random(subj = 4, item = 4) %>%
add_between("subj", cond = c("cntl", "test")) %>%
add_recode("cond", "cond.t", cntl = 0, test = 1)
[Package faux version 1.2.1 Index]