ordered_var {variables} | R Documentation |
Ordered Categorical Variable
Description
Formal description of an ordered categorical variable
Usage
ordered_var(name, desc = NULL, levels, sparse = FALSE, ...)
Arguments
name |
character, the name of the variable |
desc |
character, a description of what is measured |
levels |
character, the ordered levels of the factor |
sparse |
logical, set-up a sparse model matrix |
... |
ignored |
Details
A conceptual description of a (yet) unobserved ordered categorical variable.
Value
An object of class ordered\_var
inheriting from var
with
corresponding methods.
Examples
ordered_var("temp", "temperature", c("cold", "lukewarm", "warm", "hot"))
[Package variables version 1.1-1 Index]