Description Usage Arguments Author(s) See Also
View source: R/contrast_functions.R
The fac_and_contr
function is a convenience function which coerces
x
to a factor with specified levels
and contrasts
.
1 | fac_and_contr(x, levels, contrasts, ordered = FALSE)
|
x |
An object coercible to |
levels |
A character vector of levels for the factor. |
contrasts |
A matrix of |
ordered |
A logical indicating whether or not the factor is ordered
(default |
Christopher D. Eager <eager.stats@gmail.com>
named_contr_sum
(unordered factors) and
scaled_contr_poly
(ordered factors).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.