fct_attrs {edibble} R Documentation

Setting the traits of factors

Description

This function is used to set characteristics of the factors.

Usage

fct_attrs(
levels = NULL,
label = NULL,
description = NULL,
unit_of_measure = NULL,
class = NULL,
...
)


Arguments

 levels An edbl_lvls object that should contain information about the levels in the factor. label A string that denotes the long name of the factor. description The text description of the factor. unit_of_measure A string denoting the unit of measurement if applicable. class An optional subclass. ... 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.

Value

An edbl_lvls object.

fct_attrs(levels = c("A", "B"))