Skip to contents

Create an object that specifies the desired levels for a factor variable. This specification object does not contain any data itself, only the rules for harmonization.

Usage

specify_fct(levels = character())

Arguments

levels

(character) The allowed values of the factor.

Value

A hrmn_spec_fct object that acts as a specification.

See also

Other specification functions: specify_df()

Examples

specify_fct(levels = c("a", "b", "c"))
#> $levels
#> [1] "a" "b" "c"
#> 
#> attr(,"class")
#> [1] "hrmn_spec_fct" "hrmn_spec"     "list"