代码之家  ›  专栏  ›  技术社区  ›  Peter

r VennDiagram制造。真相表“error could not find function”如何使其工作?

  •  0
  • Peter  · 技术社区  · 9 年前

    VennDiagram::make.truth.table:

     make.truth.table(c(a = 1, b = 2, c = 3, d = 4))
    

    Error in make.truth.table(c(a = 1, b = 2, c = 3, d = 4)) : 
      could not find function "make.truth.table"
    

    除了 VennDiagram 文档

    a) 功能输出

    b) 为什么它不起作用

    我正在使用:

    R version 3.4.1 (2017-06-30)
    Platform: x86_64-w64-mingw32/x64 (64-bit)
    Running under: Windows 7 x64 (build 7601) Service Pack 1
    RStudio version 1.0.153
    

    附加基本包:

    [1] grid      stats     graphics  grDevices utils     datasets  methods   base  
    

    [1] VennDiagram_1.6.17  futile.logger_1.4.3 knitr_1.17
    
    1 回复  |  直到 9 年前
        1
  •  1
  •   glennsl Namudon'tdie    8 年前

    我认为此功能已被替换为 get.venn.partitions() 更新包后。然而,文件没有更新,应该更新。

    get.venn.partitions(list(a = 1, b = 2, c = 3, d = 4))

           a     b     c     d                    ..set.. ..values.. ..count..
    1   TRUE  TRUE  TRUE  TRUE                    anbncnd                    0
    2  FALSE  TRUE  TRUE  TRUE               (bncnd)\\(a)                    0
    3   TRUE FALSE  TRUE  TRUE               (ancnd)\\(b)                    0
    4  FALSE FALSE  TRUE  TRUE        (cnd)\\(a<U+222A>b)                    0
    5   TRUE  TRUE FALSE  TRUE               (anbnd)\\(c)                    0
    6  FALSE  TRUE FALSE  TRUE        (bnd)\\(a<U+222A>c)                    0
    7   TRUE FALSE FALSE  TRUE        (and)\\(b<U+222A>c)                    0
    8  FALSE FALSE FALSE  TRUE (d)\\(a<U+222A>b<U+222A>c)          4         1
    9   TRUE  TRUE  TRUE FALSE               (anbnc)\\(d)                    0
    10 FALSE  TRUE  TRUE FALSE        (bnc)\\(a<U+222A>d)                    0
    11  TRUE FALSE  TRUE FALSE        (anc)\\(b<U+222A>d)                    0
    12 FALSE FALSE  TRUE FALSE (c)\\(a<U+222A>b<U+222A>d)          3         1
    13  TRUE  TRUE FALSE FALSE        (anb)\\(c<U+222A>d)                    0
    14 FALSE  TRUE FALSE FALSE (b)\\(a<U+222A>c<U+222A>d)          2         1
    15  TRUE FALSE FALSE FALSE (a)\\(b<U+222A>c<U+222A>d)          1         1
    

    这确实是真值表。顺便说一句,这个函数对于帮助理解计算很重要。重叠功能,因为真值表中的计数可以帮助您确定哪个列表对应于哪个重叠。

    #For example
    print(example<-calculate.overlap(list(a = 1, b = 2, c = 3, d = 4)))