UpSet.js Combination Modes

Samuel Gratzl

2021-02-15

UpSet.js Combination Modes

library(upsetjs)
library(tibble)
## Warning: package 'tibble' was built under R version 3.6.3
t <- tribble(
  ~set1, ~set2, ~set3,
   1,   1,   0,
   0,   0,   1,
   0,   1,   1,
   0,   0,   1,
   0,   0,   1,
   0,   1,   1,
   1,   0,   1,
   0,   1,   1,
   0,   0,   1,
   0,   0,   1,
   1,   1,   1,
   1,   0,   0,
   0,   0,   1,
   0,   1,   0,
   1,   1,   1,
   0,   1,   0,
   0,   1,   1,
   0,   1,   0,
   0,   0,   1,
   0,   0,   1
)

Intersection Mode

upsetjs() %>% fromDataFrame(t) %>% generateIntersections()

Union Mode

upsetjs() %>% fromDataFrame(t) %>% generateUnions()

Distinct Intersection Mode

upsetjs() %>% fromDataFrame(t) %>% generateDistinctIntersections()