count_venn: Compute counts for a list of sets

Description Usage Arguments Value Examples

View source: R/count_venn.R

Description

Compute the overlaps of up to 26 sets in a list. Similar to vennCounts from the limma package.

Usage

1

Arguments

l

list of up to 26 numeric or character vectors (i.e. sets) to compare. Within each set there must not be any duplicated elements. If the list is not named then capital letters starting from A to Z will be substituted as names.

Value

Returns a numeric matrix with 2^length(l) rows and length(l) + 2 columns. Each row corresponds to the overlap of a particular combination of sets. The first length(l) columns correspond to each set and contain 1 or 0 indicating membership or not in each set. The second last column called count gives the sum of each row and the last column percent is the the value of count for each row, divided by sum of the count column multiplied by 100.

Examples

1
2
3
4
5
6
7
lst <- list(
  set1 = c(1:3),
  set2 = c(3:20),
  set3 = c(1, 20:66)
)

count_venn(lst)

csdaw/ggvd documentation built on Dec. 31, 2021, 6:14 p.m.