powered by
Use a hypr object for contrasts
# S3 method for hypr use_contrasts( factor_col, code_by = NA, reference_level = NA, set_intercept = NA, drop_trends = NA, labels = NULL, as_is = FALSE, ... )
Contrast matrix specified by the hypr object
A factor vector, eg from df$factorVarName
A hypr object created with hypr::hypr()
hypr::hypr()
Not used
A vector of labels to apply to the matrix column names, default
Logical, default FALSE, whether to leave the resulting matrix
Additional arguments, not used
if (FALSE) { # rlang::is_installed("hypr") hypr_obj <- hypr::hypr(a ~ b, c ~ b) # centered pairwise comparisons to b use_contrasts(factor(c('a', 'b', 'c')), hypr_obj) }
Run the code above in your browser using DataLab