Friday, January 27, 2012

Venn diagrams in R - gplots.venn

http://www.oga-lab.net/RGM2/func.php?rd_id=gplots:venn


##
## Example using a list of item names belonging to the
## specified group.
##

## construct some fake gene names..
oneName <- function() paste(sample(LETTERS,5,replace=TRUE),collapse="") geneNames <- replicate(1000, oneName()) ## GroupA <- sample(geneNames, 400, replace=FALSE) GroupB <- sample(geneNames, 750, replace=FALSE) GroupC <- sample(geneNames, 250, replace=FALSE) GroupD <- sample(geneNames, 300, replace=FALSE) input <-list(GroupA,GroupB,GroupC,GroupD) input venn(input)

No comments: