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 this edge Error: length(cutedge) == 1 is not TRUE? #38
The issue may be related to the use of grid.newpage(). I got the following error after putting it in the place where it is now in the complete code. Error
Error: length(cutedge) == 1 is not TRUE
In addition: Warning messages:
1: In .local(from, to, graph) : edges replaced: ‘i2|i3’
2: In .local(from, to, graph) : edges replaced: ‘i3|i2’
Execution halted
Code
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.all[["p"]] < alpha), #as.vector(p.mat[["p"]] < alpha),
which(p.mat.all[["r"]] < alpha), #as.vector(p.mat[["r"]] < alpha),
which(p.mat.all[["t"]] < alpha) #as.vector(p.mat[["t"]] < alpha)
)
Vstem <- Venn(lista)#, SetNames = c("p", "r", "t"))
Tstem <- compute.Venn(Vstem, doWeights = TRUE, type = "circles")
grid.newpage() # has to be before plot here!
# plot(Tstem)
# Temporal event, fails here but not in ECG one
# ChowRuskey weighted 4-set diagram = Euler diagram already
gp <- VennThemes(Tstem, colourAlgorithm = "sequential")
gps <- gp[["Set"]]
nSets <- length(gps)
for (ix in 1:nSets) {
gps[[ix]]$lwd <- nSets + 1 - ix
}
gp[["Set"]] <- gps
plot(Vstem, type = "ChowRuskey", show = list(SetLabels = TRUE),
gp = gp)
str(Vstem)
plot(Vstem, doWeights = TRUE, type = "circles")
The issue may be related to the use of
grid.newpage()
. I got the following error after putting it in the place where it is now in the complete code. ErrorCode
R: 3.3.1
OS: Debian 8.5