add_recode: Recode a categorical column

View source: R/add_ranef.R

add_recodeR 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)

faux documentation built on April 20, 2023, 9:13 a.m.