use_contrasts.default: Default method for use_contrasts
Description
If a user doesn't specify a contrast matrix, use the defaults from options().
If the user tries to use something we don't know how to work with, throw a
warning that we'll be using the defaults from options().
Contrast matrix, using the ordered or unordered default from
options()
Arguments
factor_col
A factor vector, eg from df$factorVarName
code_by
Some object that's not a matrix or function. If NA, no warning
will be thrown, and the default contrasts will be used. A warning will be
thrown if it's not NA.
reference_level
Not used
set_intercept
Not used
drop_trends
Not used
labels
A vector of labels to apply to the matrix column names, default
as_is
Logical, default FALSE, whether to leave the resulting matrix