| fac_and_contr {standardize} | R Documentation |
Create a factor and specify contrasts.
Description
The fac_and_contr function is a convenience function which coerces
x to a factor with specified levels and contrasts.
Usage
fac_and_contr(x, levels, contrasts, ordered = FALSE)
Arguments
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 |
Author(s)
Christopher D. Eager <eager.stats@gmail.com>
See Also
named_contr_sum (unordered factors) and
scaled_contr_poly (ordered factors).
[Package standardize version 0.2.2 Index]