5

My question involves how to annotate a venn diagram with the actual values in addition to the default counts, using any R package. Below is a minimal example of the data:

list.items <- list(method1=c("item1","item2","item3","item4","item5","item6"), 
                   method2=c("item1","item7","item3","item4","item8","item6"), 
                   method3=c("item1","item7","item9","item4","item10","item11"))
library(gplots)
venn(list.items)

This returns the venn diagram: enter image description here I would like to see for example what the 3 items that method3 has actually are? e.g. item3,item5 & item7.

I would like to have a venn diagram such as the one in: http://openi.nlm.nih.gov/detailedresult.php?img=3026361_1471-2105-11-S6-S14-9&req=4 Any assistance would be greatly appreciated.

amo
  • 3,030
  • 4
  • 25
  • 42

1 Answers1

-1

It appears from the documentation not possible to do what you want with gtools and gplots. It may be possible using the vennDiagram package or Vennerable from enter link description here R-Forge.

But here is one way to display the elements using the venneuler package.

library("venneuler")
df <- data.frame(method1=c("item1","item2","item3","item4","item5","item6"),
                 method2=c("item1","item7","item3","item4","item8","item6"),
                 method3=c("item1","item7","item9","item4","item10","item11"))
vd <- venneuler(df)
plot(vd)

enter image description here

lawyeR
  • 7,488
  • 5
  • 33
  • 63
  • Three circles are expected for the three methods (not items) and the items inside the three circles. – amo May 13 '15 at 07:11