---
title: "UpSet.js Comparison"
author: "Samuel Gratzl"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{UpSet.js Comparison}
  %\VignetteEngine{knitr::rmarkdown}
  \usepackage[utf8]{inputenc}
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

# UpSet.js Comparsion

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

Load the included Game of Thrones dataset

```{r data}
data(got)
got
```

## UpSet Plot

```{r, fig.width=9, fig.height=5, out.width="850px", tidy=TRUE, fig.align='center'}
upsetjs() %>% fromDataFrame(got) %>% interactiveChart()
```

## Venn Diagram (5 sets at most)

```{r, fig.width=9, fig.height=5, out.width="850px", tidy=TRUE, fig.align='center'}
upsetjsVennDiagram() %>% fromDataFrame(got) %>% interactiveChart()
```

## Karnaugh Map

```{r, fig.width=9, fig.height=5, out.width="850px", tidy=TRUE, fig.align='center'}
upsetjsKarnaughMap() %>% fromDataFrame(got) %>% interactiveChart()
```
