I'm trying to understand how venneuler
works and it outputs a venn diagram I wouldn't expect. I like to work with simple examples when I'm trying to understand something. I'm supplying the matrix below which I believe is :
a logical or numeric matrix whose columns represent sets and co-occurrence is defined by non-zero (rep. TRUE) values in rows (weight for a row being 1 for logical matrices or the row sum for numeric matrices). -venneular manual-
I would expect if two things both have 1's or 0's in the same row they'd have overlap in their venn. So in this matrix w and z have no 1's or 0's in common. I'd expect their venn's not to overlap but they do (see figure 1 below). Why? If I'm supplying wrong information or it needs to be reformatted please explain. If it's in the calculations of venneular
please explain that.
w x y z
[1,] 1 0 1 0
[2,] 0 0 1 1
[3,] 0 0 1 1
[4,] 1 1 0 0
The code for the above:
library(venneuler)
w <- c(1,0,0,1)
x <- c(0, 0, 0, 1)
y <- c(1, 1, 1,0)
z <- c(0, 1, 1,0)
a <- cbind(w, x, y, z)
v <- venneuler(a)
plot(v)