js229 / Vennerable

Vennerable provides Venn diagrams in R. It displays Venn and Euler diagrams for up to 9 different sets and using a variety of geometries. It allows the display of area-weighted Venn diagrams and allows fine graphical control over the result.
90 stars 39 forks source link

Why doWeights = TRUE fails here? #39

Open sami10007 opened 7 years ago

sami10007 commented 7 years ago

The following code gives the output as in Figure here but reproduced here, although you have plot(Vstem, doWeights = TRUE, type = "circles") with TRUE weights.

screenshot from 2016-11-14 21 55 11

library("Vennerable")
library('limma') # vennCounts, vennDiagram
library("psych")

ids <- seq(1,11)
M.cor <- cor(mtcars)
colnames(M.cor) <- ids
rownames(M.cor) <- ids

p.mat <- psych::corr.test(M.cor, adjust = "none", ci = F)

alpha <- 0.000000005

lista <- list(
  which(p.mat[["p"]] < alpha), #as.vector(p.mat[["p"]] < alpha), 
  which(p.mat[["r"]] < alpha), #as.vector(p.mat[["r"]] < alpha),
  which(p.mat[["t"]] < alpha) #as.vector(p.mat[["t"]] < alpha)
  )
# List of 3 vectors    

Vstem <- Venn(lista)

plot(Vstem, doWeights = TRUE, type = "circles")

R: 3.3.1
OS: Debian 8.5