Summarize the size of intersections between samples in an upset compliant data frame
from_upset_df_to_intersection_summary.Rd
`from_upset_df_to_intersection_summary()` reports the same information as upset plots but in a data frame. It reports the intersection identity and the number of elements shared by the intersections.
Examples
sample1 <- c("a", "b", "c")
sample2 <- c("b", "c", "d")
upset_list <- list(sample1 = sample1, sample2 = sample2)
upset_df <- from_list_to_upset_df(upset_list)
from_upset_df_to_intersection_summary(upset_df)
#> # A tibble: 3 × 2
#> intersection n
#> <chr> <int>
#> 1 sample1_sample2 2
#> 2 0_sample2 1
#> 3 sample1_0 1