venn {gplots}R Documentation

Plot a Venn diagram

Description

Plot Venn diagrams for up to 5 sets

Usage

venn(data, universe=NA, small=0.7, showSetLogicLabel=FALSE,
     simplify=FALSE, show.plot=TRUE)

Arguments

data data to be plotted (see below)
universe ??
small Character size of group labels
showSetLogicLabel Logical flag indicating whether the internal group label should be displayed
simplify Logical flag indicating whether unobserved group should be omitted.
show.plot Logical flag indicating whether the plot should be displayed. If false, simply returns the group count matrix.

Details

data should be either a named list of vectors containing indexes of group members (1, 2, 3,..) , or a data frame containing indicator variables (TRUE, FALSE, TRUE, ..) for group membership. Group names will be taken from the component vector or column names.

Value

A matrix of all possible sets of groups, and the observed numer of items beloinging to each set of groups is returned invisibly. The fist column contains observed counts, subsequent columns contain 0-1 indicators of group membership.

Author(s)

Steffen Moeller steffen_moeller@gmx.de, with cleanup and packaging by Gregory R. Warnes greg@random-technologies-llc.com.

Examples


##
## Example using a list of item indexes  belonging to the
## specified group.
##
A<- 1:20
B<- 1:20
C<- 2:20
D<- 3:21
input<-list(A,B,C,D)
input

venn(input)

##
## Example using a data frame of indicator columns
##
A<- as.logical(rbinom(100, 1, 0.2))
B<- as.logical(rbinom(100, 1, 0.7))
C<- as.logical(rbinom(100, 1, 0.2))
D<- as.logical(rbinom(100, 1, 0.1))
input<-data.frame(A,B,C,D)
venn(input)

## Omit un-observed groupings
tmp <- venn(input, simplify=TRUE)

## show details
tmp

## Show internal binary group labels
venn(input, showSetLogicLabel=TRUE)

## Specify universe
venn(input, universe=NULL, showSetLogicLabel=TRUE)

[Package gplots version 2.7.1 Index]