Author: Samuel Gratzl
Date: 2022-07-12

# UpSet.js Comparison

#### Samuel Gratzl

#### 2022-07-12

# UpSet.js Comparsion

    # devtools::install_url("https://github.com/upsetjs/upsetjs_r/releases/latest/download/upsetjs.tar.gz")
    library(upsetjs)

Load the included Game of Thrones dataset

    data(got)
    got

    ##                  Lannister Stark female male royal was.killed
    ## Alton Lannister          1     0      0    1     0          1
    ## Arya Stark               0     1      1    0     0          0
    ## Benjen Stark             0     1      0    1     0          1
    ## Bran Stark               0     1      0    1     1          0
    ## Brandon Stark            0     1      0    0     0          1
    ## Catelyn Stark            0     1      1    0     0          1
    ## Cersei Lannister         1     0      1    0     1          1
    ## Eddard Stark             0     1      0    1     0          1
    ## Jaime Lannister          1     0      0    1     0          1
    ## Jon Snow                 0     1      0    1     1          1
    ## Kevan Lannister          1     0      0    1     0          1
    ## Lancel Lannister         1     0      0    1     0          1
    ## Lyanna Stark             0     1      1    0     0          1
    ## Martyn Lannister         1     0      0    1     0          1
    ## Rickard Stark            0     1      0    1     0          1
    ## Rickon Stark             0     1      0    1     0          1
    ## Robb Stark               0     1      0    1     1          1
    ## Sansa Stark              0     1      1    0     1          0
    ## Tyrion Lannister         1     0      0    1     0          0
    ## Tywin Lannister          1     0      0    1     0          1
    ## Willem Lannister         1     0      0    1     0          1

## UpSet Plot

    upsetjs() %>%
        fromDataFrame(got) %>%
        interactiveChart()

## Venn Diagram (5 sets at most)

    upsetjsVennDiagram() %>%
        fromDataFrame(got) %>%
        interactiveChart()

## Karnaugh Map

    upsetjsKarnaughMap() %>%
        fromDataFrame(got) %>%
        interactiveChart()