Re: [R] Venn diagram with identification numbers

2014-02-21 Thread David Winsemius

On Feb 21, 2014, at 11:00 AM, Luigi Marongiu wrote:

> Dear all,
> 
> I would like to draw a Venn plot for data represented by 6 variables. I
> know how to do this using the package venneuler (which requires rJava).
> However this package does not report the numbers of elements within each
> class.
> 

Labeling is already in the VennDiagram package, and I recently answered a 
question on SO asking to include percentages as well:

http://stackoverflow.com/questions/21715009/adding-percents-to-venn-diagrams-in-r/21717547#21717547

Now admittedly this was only for the set intersections of three sets. The 
output of `venneuler` is not compatible with that approach, but it does appear 
that there ir a `draw.quintuple.venn` function in VennDiagram.

-- 
David.

> Do you know how to display the number of elements using either this or
> other packages?
> 
> Best wishes,
> 
> Luigi
> 
> 
> 
>library(venneuler)
> 
>library(rJava)
> 
> 
> 
> a<-c(   1, 1, 1, 1, 1, 1,
>   1,
> 1, 1, 1, 1, 1, 1, 1,
> 0,0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0,0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0,0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0,0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0,0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0,0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0)
> 
> b<-c(   0, 0, 0, 0, 0, 0,
>   0,
> 0, 0, 0, 0, 0, 0, 0,
> 1,1, 1, 1, 1, 1, 1,
> 1, 1, 1, 1, 1, 1, 1,
> 1, 1,1, 1, 1, 1, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0,0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0,0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0,0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0,0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0)
> 
> c<-c(   0, 0, 0, 0, 0, 0,
>   0,
> 0, 0, 0, 0, 0, 0, 0,
> 0,1, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0,0, 0, 0, 0, 0,
> 0, 0, 1, 1, 1, 1, 1,
> 1, 1, 1,1, 1, 1, 1,
> 1, 1, 1, 1, 1, 1, 1,
> 1, 1, 1, 1,1, 1, 1,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0,0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0,0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0)
> 
> d<-c(   0, 0, 0, 0, 0, 0,
>   0,
> 0, 0, 0, 0, 0, 0, 0,
> 0,0, 0, 0, 1, 1, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0,0, 0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 1,0, 0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 0,0, 0, 0,
> 0, 0, 0, 0, 0, 0, 0,
> 0, 0, 0, 

[R] Venn diagram with identification numbers

2014-02-21 Thread Luigi Marongiu
Dear all,

I would like to draw a Venn plot for data represented by 6 variables. I
know how to do this using the package venneuler (which requires rJava).
However this package does not report the numbers of elements within each
class.

Do you know how to display the number of elements using either this or
other packages?

Best wishes,

Luigi



library(venneuler)

library(rJava)



a<-c(   1, 1, 1, 1, 1, 1,
   1,
1, 1, 1, 1, 1, 1, 1,
0,0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0,0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0,0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0,0, 0, 0,
0, 0, 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