3

Suppose I have 4 sets A,B,C,D each having 40 elements. I don't know the elements of these 4 sets but i know how many elements are common among these sets.

The matrix which shows the number of common elements are :

    A   B   C   D
A  40   21  33  38
B  21   40  25  31
C  33   25  40  27  
D  38   31  27  40

To understand better:

There are 21 common element between set A and B, 25 between B and C and so on ...

How can i generate 4 way venn diagram in R?

bioinformatician
  • 364
  • 1
  • 12
  • 27
  • 2
    Should the diagram only represent pairwise interactions? I don't think there is enough info to tell how many elements are in common among three or more sets. Then maybe a Venn diagram isn't the best way to represent that data. Instead, you could use an undirected graph, where the vertices will be your sets and the edges will be the number of items in common. – flodel Oct 14 '13 at 11:30
  • Dear Flodel, based on your comment, I could able to understand that it is not possible to draw venn diagram for 3 or more sets for the information i have. Rather i would try alternate method like undirected graph which you suggested. Thanks a lot – bioinformatician Oct 14 '13 at 11:33
  • There's a good guide here: http://www.ats.ucla.edu/stat/r/faq/venn.htm The `limma` package handles venn diagrams of up to 5 sets. – Scott Ritchie Oct 14 '13 at 11:34
  • 2
    @Manetheran, using the link you posted, the OP has no way of telling the number (`22`) at the center of the first graph shown there. – flodel Oct 14 '13 at 11:36
  • can someone tell me how you would generally describe the above matrix? Is there a name for such a thing? – maxheld Feb 12 '16 at 20:07
  • Possible relevant thread here with a case example http://stackoverflow.com/q/40563697/54964 – Léo Léopold Hertz 준영 Nov 13 '16 at 15:32

0 Answers0