vennDiagram2: vennDiagram2()

Description Usage Arguments Value Note Examples

View source: R/helper_functions.R

Description

Wrapper for VennDiagram::venn.diagram() function

Usage

1
2
vennDiagram2(input_ls, title = "",
  col_palette = RColorBrewer::brewer.pal(9, "Set1"), ...)

Arguments

input_ls

A list, e.g. input_ls = list(list1 = c("A", "B", "C"), list2= c("A", "B", "D"))

title

(str) plot title

...

more arguments in VennDiagram::venn.diagram()

palette

(list of named colors) default is brewer.pal(8,"Accent")

Value

a venn diagram

Note

the plot will overlap with the old plot, use graphics.off() to clear old plots not recomended for over 5 lists (very messy with more than 5 lists)

Examples

1
2
3
4
5
6
7
graphics.off()
input_ls = list(list1 = c("A", "B", "C"), list2= c("A", "B", "D"))
pal <- c(list1 = "red", list2 = "blue")  ## if the colour is named the same as the list name, the colour will correponding to the specific list
vennDiagram2(input_ls, col_palette=pal)

graphics.off()
vennDiagram2(input_ls)

BerylZhuang/helper_functions documentation built on March 15, 2021, 5:19 a.m.