UpSet.js Combination Modes

knitr::opts_chunk$set(echo = TRUE)

UpSet.js Combination Modes

library(upsetjs)
library(tibble)
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()


Try the upsetjs package in your browser

Any scripts or data that you put into this service are public.

upsetjs documentation built on July 13, 2022, 9:06 a.m.