Running ‘testthat.R’ [8s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > test_check("data.tree")
  Loading required package: data.tree
  ── 1. Error: grViz (@test-draw.R#18)  ──────────────────────────────────────────
  not a function
  1: ToDiagrammeRGraph(acme, direction = "descend", pruneFun = function(x) x$level < 3) at testthat/test-draw.R:18
  2: do.call("ToDataFrameNetwork", c(root, from = function(node) node$parent$.id, to = ".id", 
         myargs, direction = list(direction), pruneFun = pruneFun))
  3: ToDataFrameNetwork(<environment>, from = function (node) 
     node$parent$.id, to = ".id", arrowhead = function (node = node, origNode = node) 
     {
         myes <- GetStyle(node, style, "edge")
         myes
     }, color = function (node = node, origNode = node) 
     {
         myes <- GetStyle(node, style, "edge")
         myes
     }, penwidth = function (node = node, origNode = node) 
     {
         myes <- GetStyle(node, style, "edge")
         myes
     }, direction = "descend", pruneFun = function (x) 
     x$level < 3)
  4: ToDataFrameTree(x, ..., traversal = "level", pruneFun = pruneFun, format = format, 
         inheritFromAncestors = inheritFromAncestors)
  5: as.data.frame(x, row.names = NULL, optional = FALSE, ..., pruneFun = pruneFun)
  6: as.data.frame.Node(x, row.names = NULL, optional = FALSE, ..., pruneFun = pruneFun)
  7: Clone(x, attributes = TRUE)
  8: .Clone(node, pruneFun, attributes)
  9: node$clone()
  10: makeActiveBinding(name, active_copies[[name]], public_bind_env)
  
  ── 2. Error: ToDataFrame sub-tree (@test-treeConversionDataFrame.R#116)  ───────
  not a function
  1: ToDataFrameTree(it) at testthat/test-treeConversionDataFrame.R:116
  2: as.data.frame(x, row.names = NULL, optional = FALSE, ..., pruneFun = pruneFun)
  3: as.data.frame.Node(x, row.names = NULL, optional = FALSE, ..., pruneFun = pruneFun)
  4: Clone(x, attributes = TRUE)
  5: .Clone(node, pruneFun, attributes)
  6: node$clone()
  7: makeActiveBinding(name, active_copies[[name]], public_bind_env)
  
  ── 3. Error: Climb Equivalent (@test-treeMethods.R#53)  ────────────────────────
  'dimnames' must be a list
  1: expect_equal(Climb(acme, "IT", "Go agile"), Climb(acme, "IT")$Climb("Go agile")) at testthat/test-treeMethods.R:53
  2: compare(act$val, exp$val, ...)
  3: compare.default(act$val, exp$val, ...)
  4: all.equal(x, y, ...)
  5: all.equal.default(x, y, ...)
  6: all.equal.environment(target, current, ...)
  7: all.equal.list(as.list.environment(target, all.names = all.names, sorted = TRUE), 
         as.list.environment(current, all.names = all.names, sorted = TRUE), ...)
  8: attr.all.equal(target, current, ...)
  9: mode(target)
  10: as.list.environment(target, all.names = all.names, sorted = TRUE)
  11: (function () 
     {
         as.vector(na.omit(unique(unlist(Get(Traverse(self), "fields")))))
     })()
  12: as.vector(na.omit(unique(unlist(Get(Traverse(self), "fields"))))) at /home/rstudio/data.tree/R/node.R:365
  13: na.omit(unique(unlist(Get(Traverse(self), "fields"))))
  14: unique(unlist(Get(Traverse(self), "fields")))
  15: unlist(Get(Traverse(self), "fields"))
  16: Get(Traverse(self), "fields")
  
  ── 4. Error: Clone (@test-treeMethods.R#519)  ──────────────────────────────────
  not a function
  1: Clone(acme) at testthat/test-treeMethods.R:519
  2: .Clone(node, pruneFun, attributes)
  3: node$clone()
  4: makeActiveBinding(name, active_copies[[name]], public_bind_env)
  
  ── 5. Error: Clone formatter (@test-treeMethods.R#542)  ────────────────────────
  not a function
  1: Clone(acme, attributes = TRUE) at testthat/test-treeMethods.R:542
  2: .Clone(node, pruneFun, attributes)
  3: node$clone()
  4: makeActiveBinding(name, active_copies[[name]], public_bind_env)
  
  ── 6. Error: Clone subtree (@test-treeMethods.R#557)  ──────────────────────────
  not a function
  1: Clone(it) at testthat/test-treeMethods.R:557
  2: .Clone(node, pruneFun, attributes)
  3: node$clone()
  4: makeActiveBinding(name, active_copies[[name]], public_bind_env)
  
                            levelName    cost
  1  Acme Inc.                             NA
  2   ¦--Accounting                        NA
  3   ¦   ¦--New Software             1000000
  4   ¦   °--New Accounting Standards  500000
  5   ¦--Research                          NA
  6   ¦   ¦--New Product Line         2000000
  7   ¦   °--New Labs                  750000
  8   °--IT                                NA
  9       ¦--Outsource                 400000
  10      ¦--Go agile                  250000
  11      °--Switch to R                50000
    levelName  b             1
  1 Root      NA              
  2  °--a      2              
  3      °--c NA 1, 2, 3, 4, 5
    levelName a
  1     Root   
  2      °--a 2
  ── 7. Error: PruneDist 1 (@test-util.R#25)  ────────────────────────────────────
  not a function
  1: data.tree:::PrintPruneDist(acme, limit = 1) at testthat/test-util.R:25
  2: Clone(x, pruneFun = function(x) x$.keep, attributes = TRUE)
  3: .Clone(node, pruneFun, attributes)
  4: node$clone()
  5: makeActiveBinding(name, active_copies[[name]], public_bind_env)
  
  ── 8. Error: PruneDist 2 (@test-util.R#35)  ────────────────────────────────────
  not a function
  1: data.tree:::PrintPruneDist(acme, limit = 5) at testthat/test-util.R:35
  2: Clone(x, pruneFun = function(x) x$.keep, attributes = TRUE)
  3: .Clone(node, pruneFun, attributes)
  4: node$clone()
  5: makeActiveBinding(name, active_copies[[name]], public_bind_env)
  
  ── 9. Error: PruneSimple (@test-util.R#42)  ────────────────────────────────────
  not a function
  1: data.tree:::PrintPruneSimple(acme, limit = 5) at testthat/test-util.R:42
  2: Clone(x, pruneFun = function(x) x$.id < limit, attributes = TRUE)
  3: .Clone(node, pruneFun, attributes)
  4: node$clone()
  5: makeActiveBinding(name, active_copies[[name]], public_bind_env)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 331 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 9 ]
  1. Error: grViz (@test-draw.R#18) 
  2. Error: ToDataFrame sub-tree (@test-treeConversionDataFrame.R#116) 
  3. Error: Climb Equivalent (@test-treeMethods.R#53) 
  4. Error: Clone (@test-treeMethods.R#519) 
  5. Error: Clone formatter (@test-treeMethods.R#542) 
  6. Error: Clone subtree (@test-treeMethods.R#557) 
  7. Error: PruneDist 1 (@test-util.R#25) 
  8. Error: PruneDist 2 (@test-util.R#35) 
  9. Error: PruneSimple (@test-util.R#42) 
  
  Error: testthat unit tests failed
  Execution halted