add_recode: Recode a categorical column

Description Usage Arguments Value Examples

View source: R/add_ranef.R

Description

Recode a categorical column

Usage

1
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

1
2
3
add_random(subj = 4, item = 4) %>%
  add_between("subj", cond = c("cntl", "test")) %>%
  add_recode("cond", "cond.t", cntl = 0, test = 1)

faux documentation built on Sept. 14, 2021, 1:08 a.m.