R/factoring_variables.R
add_factor_contrasts.Rd
Add treatment contrasts to a factor
add_factor_contrasts(vect, n = levels(vect), ...)
A factor vector to which contrasts will be added.
A vector of levels for the factor. Default is the levels of vect.
vect
Additional arguments passed to contr.treatment.
contr.treatment
A factor vector with treatment contrasts added.