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.