fct_unify: Unify the levels in a list of factors

View source: R/c.R

fct_unifyR Documentation

Unify the levels in a list of factors

Description

Unify the levels in a list of factors

Usage

fct_unify(fs, levels = lvls_union(fs))

Arguments

fs

A list of factors

levels

Set of levels to apply to every factor. Default to union of all factor levels

Examples

fs <- list(factor("a"), factor("b"), factor(c("a", "b")))
fct_unify(fs)

tidyverse/forcats documentation built on Oct. 31, 2023, 7:32 p.m.