View source: R/standalone-tidy-utils.R
bind_rows_with_factors | R Documentation |
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.
bind_rows_with_factors(...)
... |
a list of dataframes |
the union of those dataframes. Factor levels are combined with a superset of all levels
library(tidyverse)
bind_rows_with_factors(iris,
ggplot2::diamonds %>% dplyr::rename(Species = cut)) %>%
dplyr::pull(Species) %>%
levels()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.