Skip to main content

Module factors

Module factors 

Source
Expand description

Factor builtins — factor construction, levels, and nlevels.

A factor is an integer vector with a “levels” attribute (character) and class “factor” (or c(“ordered”, “factor”) if ordered).

Statics§

__BUILTIN_REG_BUILTIN_FACTOR 🔒
__BUILTIN_REG_BUILTIN_LEVELS 🔒
__BUILTIN_REG_BUILTIN_NLEVELS 🔒
__BUILTIN_REG_BUILTIN_ORDERED 🔒

Functions§

builtin_factor 🔒
Encode a vector as a factor (categorical variable).
builtin_levels 🔒
levels(x) — get the levels of a factor.
builtin_nlevels 🔒
nlevels(x) — number of levels of a factor.
builtin_ordered 🔒
Construct an ordered factor.
rvalue_to_char_vec 🔒
Coerce an RValue to a character vector for level matching.