https://github.com/microbialman/VennItem
Generate Venn Diagrams with Items Listed in the Sections.
https://github.com/microbialman/VennItem
Last synced: 5 months ago
JSON representation
Generate Venn Diagrams with Items Listed in the Sections.
- Host: GitHub
- URL: https://github.com/microbialman/VennItem
- Owner: microbialman
- License: other
- Created: 2026-01-13T15:05:06.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-01-23T15:48:41.000Z (6 months ago)
- Last Synced: 2026-01-24T06:43:45.244Z (5 months ago)
- Language: R
- Size: 234 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
- awesome-ggplot2 - VennItem
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# VennItem
Generate Venn diagrams from two or three sets, displaying the overlapping items as lists in the appropriate sections. The lists can be split into columns or shortened for large sets and the plot is generated using 'ggplot2' allowing further customisations.
## Installation
You can install the development version of VennItem from [GitHub](https://github.com/) with:
``` r
# install.packages("pak")
pak::pak("microbialman/VennItem")
```
## Examples
Basic example showing two small sets.
```{r example1, fig.width=8, fig.height=8}
library(VennItem)
sets <- list(Fruit_A = c("apple","banana","coconut","orange"), Fruit_B = c("banana","kiwi","lemon","orange"), Fruit_C = c("banana","kiwi","apple","pear","lime"))
vennItem(sets, set_label_size = 4)
```
Example of larger sets showing column formatting ability.
```{r example2, fig.width=8, fig.height=8}
big_sets <- list(Fruit_A = c("apple","banana","durian","lychee","grapes","pear","melon"),
Fruit_B = c("banana","kiwi","satsuma","orange","lemon","lime"),
Fruit_C = c("banana","kiwi","apple","pear","coconut"))
vennItem(big_sets, ncol_items = 2)
```
Example of larger sets showing shortening.
```{r example3, fig.width=8, fig.height=8}
big_sets <- list(Fruit_A = c("apple","banana","durian","lychee","grapes","pear","melon"),
Fruit_B = c("banana","kiwi","satsuma","orange","lemon","lime"),
Fruit_C = c("banana","kiwi","apple","pear","coconut"))
vennItem(big_sets, max_items_per_region = 2)
```
Example showing basic numbering of set size.
```{r example4, fig.width=8, fig.height=8}
sets <- list(Fruit_A = c("apple","banana","coconut","orange"), Fruit_B = c("banana","kiwi","lemon","orange"), Fruit_C = c("banana","kiwi","apple","pear","lime"))
vennItem(sets, max_items_per_region = 0)
```