bind_rows_with_factors: Bind rows for colums with factors

View source: R/standalone-tidy-utils.R

bind_rows_with_factorsR Documentation

Bind rows for colums with factors

Description

Bind_rows works until there are factors with a set of different levels then it throws a wobbly. This handles that particular situation by combining factor levels.

Usage

bind_rows_with_factors(...)

Arguments

...

a list of dataframes

Value

the union of those dataframes. Factor levels are combined with a superset of all levels

Examples

library(tidyverse)
bind_rows_with_factors(iris,
 ggplot2::diamonds %>% dplyr::rename(Species = cut)) %>%
 dplyr::pull(Species) %>%
 levels()

terminological/ggrrr documentation built on June 15, 2024, 6:35 a.m.