[英]How can get the value of the public part of the venn diagram which drawn by venn-package in R
Now I am using venn
package in R to draw venn diagram and I succeeded.But I also want to get the value of the public part of the venn diagram.Although I have queried the official document,I cannot find any function to solve my problem.By the way,I need to draw a diagram with 6 sets,so you cannot use vennDiagram
package.I hope to get your help. 现在我在R中使用venn
包绘制维恩图并且我成功了。但是我也想得到维恩图的公共部分的价值。虽然我查询了官方文件,但我找不到任何函数来解决我的问题顺便说一下,我需要绘制一套6套图表,所以你不能使用vennDiagram
包。我希望得到你的帮助。
library(venn)
venn(list("A" = c(1,2,3),"B" = c(3,4,5),"C" = c(1,2,3,4,5,6)))
For the lengths of the intersections you can try: 对于交叉口的长度,您可以尝试:
library(venn)
v <- venn(list("A" = c(1,2,3),"B" = c(3,4,5),"C" = c(1,2,3,4,5,6)))
lengths(attr(v, "intersections"))
C B:C A:C A:B:C
1 2 2 1
For the values that intersect you can do: 对于相交的值,您可以执行以下操作:
attr(v, "intersections")
$C
[1] 6
$`B:C`
[1] 4 5
$`A:C`
[1] 1 2
$`A:B:C`
[1] 3
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.