counts2setlist: venndir conversion from overlap counts to setlist

counts2setlistR Documentation

venndir conversion from overlap counts to setlist

Description

venndir conversion from overlap counts to setlist

Usage

counts2setlist(x, sep = "&", ...)

Details

This function takes input in the form of named vector with overlap counts, which is the input to similar Venn functions in eulerr::euler(), and is called "expressionInput" when used with upsetr::fromExpression().

Value

list where the list names are the names of each set, and values of each list element is a vector of items. The items are artificial labels used for convenience.

See Also

Other venndir conversion: im2list(), im_value2list(), list2im_opt(), list2im_value(), overlaplist2setlist(), signed_counts2setlist()

Examples

# example from eulerr::euler()
combo <- c(A = 2,
   B = 2,
   C = 2,
   "A&B" = 2,
   "A&C" = 1,
   "B&C" = 1,
   "A&B&C" = 4)
setlist <- counts2setlist(combo)
setlist;

# turn off warnings about GEOS
options("warn"=-1)

# Venn diagram
venndir(setlist)

# Proportional Venn (Euler) diagram
venndir(setlist, proportional=TRUE)


jmw86069/venndir documentation built on June 15, 2024, 1:52 p.m.