Reputation: 51
For example, set A={a,b,c} and set B={b,c,d} and the intersection of sets A and B should be {b,c}.
But how can I display {b,c} instead of the count 2 in a Venn diagram? I tried venn in the limma package and Venn in the Vennerable package but neither works.
Upvotes: 3
Views: 1381
Reputation: 61
It's possible in Vennerable using the FaceText="elements" option, though its documentation is incomplete. Using the example from page 10 of Venn.pdf (available once the package is installed):
setList <- strsplit(month.name, split = "")
names(setList) <- month.name
Vmonth3 <- VennFromSets(setList[1:3])
plot(Vmonth3,doWeights=FALSE,show=list(FaceText="elements"))
It's also possible to control the appearance of the elements. For example, this code sets the font size to 10:
gp <- VennThemes(compute.Venn(Vmonth3))
gp$FaceText <- lapply(gp$FaceText,function(x) {x$fontsize<-10; return(x)})
plot(Vmonth3,doWeights=FALSE,show=list(FaceText="elements"),gp=gp)
Upvotes: 4