This function takes a list of data frames and creates an UpSet plot showing
the intersections of IDs across the data frames.
Usage
create_upset_plot(df_list, id_column)
Arguments
- df_list
A named list of data frames to compare
- id_column
Character string specifying the name of the ID column present in all data frames
Value
A ggplot object containing the UpSet plot
Examples
library(tibble)
df_list <- list(
a = tibble(id = c(1, 2, 3, 5, 7), a = 1),
b = tibble(id = c(1, 2, 5, 5), b = 0),
c = tibble(id = c(1, 2, 7, 9), c = 2)
)
create_upset_plot(df_list, "id")
#> Error in create_upset_plot(df_list, "id"): The package "ggupset" is required.