Learn R Programming

variables (version 1.1-2)

ordered_var: Ordered Categorical Variable

Description

Formal description of an ordered categorical variable

Usage

ordered_var(name, desc = NULL, levels, sparse = FALSE, ...)

Value

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

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.

Examples

Run this code

  ordered_var("temp", "temperature", c("cold", "lukewarm", "warm", "hot"))

Run the code above in your browser using DataLab