Skip to contents

`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.

Usage

from_upset_df_to_intersection_summary(upset_df)

Arguments

upset_df

An upset compliant data frame.

Value

A data frame.

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