fct: Setting the traits of factors

View source: R/attrs.R

fctR Documentation

Setting the traits of factors

Description

This function is used to set characteristics of the factors.

Usage

fct(.levels = character(), ...)

fct_attrs(.levels = character(), ...)

Arguments

.levels

Either a short hand given as either as a single integer (number of levels), a vector or levels created from lvls().

...

A name-value pair of attributes. The value must be a scalar and attributed to the whole factor (not individual levels). The values are added as attributes to the output object.

See Also

lvls

Examples

fct(c("A", "B"))

emitanaka/edibble documentation built on April 5, 2025, 4:11 a.m.