I have data that contains binary indicators for two groups and for more groups that are nested in one of the first two groups.
For instance:
set.seed(1) df <- data.frame(a=rep(0,10),b=rep(0,10),b.1=rep(0,10),b.2=rep(0,10)) df$a[sample(10,5,replace=F)] <- 1 df$b[sample(10,5,replace=F)] <- 1 df$b.1[sample(which(df$b==1),3,replace=F)] <- 1 df$b.2[sample(which(df$b==1),3,replace=F)] <- 1 df <- df[which(rowSums(df)==0),]
a and b are two groups, and b.1 and b.2 nested in group b .
What I would like to do is draw a single venn diagram of all the groups. This means that b.1 and b.2 will be described inside b that cross a .
Is there any way to achieve this? Using a ggplot solution would be great.
R VennDiagram 's attempt only for groups b, b.1 and b.2 does not even work for me:
library(VennDiagram) draw.triple.venn(area1=sum(df$b),area2=sum(df$b.1),area3=sum(df$b.2), n12=sum(df$b*df$b.1),n23=sum(df$b.1*df$b.2),n13=sum(df$b*df$b.2),n123=sum(df$b*df$b.1*df$b.2), category=c("b","b1","b2"))

With the Vennerable package Vennerable I only approach drawing groups "b":
library(Vennerable) plot(Venn(Sets=list(b=which(df$b==1),b.1=which(df$b.1==1),b.2=which(df$b.2==1))),doEuler=T,doWeight=T)

But when I add the group a , it gets messed up: 
Because I really need one circle for group a with an intersecting area with group b , and inside the circle of group b are circles of groups b.1 and b.2 .