R automatically assigns specific contrast schemes to ordered and unordered
factors as specified in options('contrasts')
but users are of course free
to set these on the factor themselves. But, if they do this outside of a call
to glimpse_contrasts
it's hard and time consuming to check what they set
against the different possible common schemes. So, rather than checking all
possible combinations, this will only check against the defaults R already
uses and alert the user if something else is set.
.warn_if_nondefault(
contrast_list,
factor_names,
factor_sizes,
which_ordered,
schemes_to_use
)
Warns if non default contrasts are set, returns schemes_to_use with modifications if necessary
List of contrasts like that generated by
enlist_contrasts
Names of the factors, also the names of the contrast list
Number of levels for each factor
Which of the factors are ordered
Character vector of schemes, if any don't match the default for a factor, it will be replaced wtih ??? in th eoutput