Learn R Programming

variables (version 1.1-1)

ordered_var: 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

Value

An object of class ordered\_var inheriting from var with corresponding methods.

Details

A conceptual description of a (yet) unobserved ordered categorical variable.

Examples

Run this code
# NOT RUN {
  ordered_var("temp", "temperature", c("cold", "lukewarm", "warm", "hot"))

# }

Run the code above in your browser using DataLab