如何从二进制矩阵做 R Vennerable Venn 图?
How to do R Vennerable Venn Diagram from Binary Matrices?
检查基本示例表明 Vennerable 输入必须是向量列表 here。
因此,我执行以下操作,在那里我采用二进制 p 值矩阵,并尝试根据它们的共同特征创建维恩图
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(
as.vector(p.mat[["p"]] < alpha),
as.vector(p.mat[["r"]] < alpha),
as.vector(p.mat[["t"]] < alpha)
)
# List of 3 vectors
Vstem <- Venn(lista)
plot(Vstem, doWeights = TRUE, type = "circles")
图1 输出错误
预期输出:三个圆的 Vennerable Venn 图
粗壮
List of 3
$ : logi [1:121] TRUE TRUE TRUE FALSE FALSE FALSE ...
$ : logi [1:121] FALSE TRUE TRUE TRUE FALSE TRUE ...
$ : logi [1:121] FALSE TRUE TRUE TRUE FALSE TRUE ...
Formal class 'Venn' [package "Vennerable"] with 2 slots
..@ IndicatorWeight : int [1:8, 1:4] 0 1 0 1 0 1 0 1 0 0 ...
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : chr [1:8] "000" "100" "010" "110" ...
.. .. ..$ : chr [1:4] "1" "2" "3" ".Weight"
..@ IntersectionSets:List of 8
.. ..$ 000: NULL
.. ..$ 100: NULL
.. ..$ 010: NULL
.. ..$ 110: NULL
.. ..$ 001: NULL
.. ..$ 101: NULL
.. ..$ 011: NULL
.. ..$ 111: logi [1:2] TRUE FALSE
R: 3.3.1
OS:Debian 8.5
检查基本示例表明 Vennerable 输入必须是向量列表 here。 因此,我执行以下操作,在那里我采用二进制 p 值矩阵,并尝试根据它们的共同特征创建维恩图
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(
as.vector(p.mat[["p"]] < alpha),
as.vector(p.mat[["r"]] < alpha),
as.vector(p.mat[["t"]] < alpha)
)
# List of 3 vectors
Vstem <- Venn(lista)
plot(Vstem, doWeights = TRUE, type = "circles")
图1 输出错误
预期输出:三个圆的 Vennerable Venn 图
粗壮
List of 3
$ : logi [1:121] TRUE TRUE TRUE FALSE FALSE FALSE ...
$ : logi [1:121] FALSE TRUE TRUE TRUE FALSE TRUE ...
$ : logi [1:121] FALSE TRUE TRUE TRUE FALSE TRUE ...
Formal class 'Venn' [package "Vennerable"] with 2 slots
..@ IndicatorWeight : int [1:8, 1:4] 0 1 0 1 0 1 0 1 0 0 ...
.. ..- attr(*, "dimnames")=List of 2
.. .. ..$ : chr [1:8] "000" "100" "010" "110" ...
.. .. ..$ : chr [1:4] "1" "2" "3" ".Weight"
..@ IntersectionSets:List of 8
.. ..$ 000: NULL
.. ..$ 100: NULL
.. ..$ 010: NULL
.. ..$ 110: NULL
.. ..$ 001: NULL
.. ..$ 101: NULL
.. ..$ 011: NULL
.. ..$ 111: logi [1:2] TRUE FALSE
R: 3.3.1
OS:Debian 8.5