Running ‘testthat.R’ [57s/76s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(TreeSearch)
  > 
  > test_check("TreeSearch")
  ── 1. Failure: UniqueSplits works (@test-Partitions.R#6)  ──────────────────────
  c(`8` = FALSE, `10` = FALSE, `11` = FALSE) not equal to UniqueSplits(splits6)["t4", ].
  Names: 1 string mismatch
  3 element mismatches
  
  
    - Performing tree search.  Initial score: 19
    - Final score 10 found 1 times after 100 rearrangements
  ── 2. Failure: NNI works (@test-tree-rearrange.R#18)  ──────────────────────────
  `nniComb` not equal to read.tree(text = "(((((3,2),1),4),5),6);").
  FALSE
  
  ── 3. Failure: CollapseNodes works (@test-tree-rearrange.R#157)  ───────────────
  no1213$edge not equal to matrix(...).
  10/20 mismatches (average diff: 4)
  [2]   8 -  9 == -1
  [4]  10 -  8 ==  2
  [5]  11 - 10 ==  1
  [9]   9 - 10 == -1
  [10]  9 - 10 == -1
  [11]  1 -  9 == -8
  [12]  9 -  1 ==  8
  [13] 10 -  2 ==  8
  [14] 11 - 10 ==  1
  ...
  
  ── 4. Failure: CollapseNodes works (@test-tree-rearrange.R#160)  ───────────────
  no1213$edge.length not equal to c(el[1:7], el[8] + c(c(el[9] + el[10:11]), el[12])).
  5/10 mismatches (average diff: 0.965)
  [6]  1.372 - 0.992 ==  0.380
  [7]  1.769 - 0.380 ==  1.389
  [8]  0.935 - 1.924 == -0.990
  [9]  0.864 - 2.364 == -1.500
  [10] 0.338 - 0.903 == -0.565
  
  ── 5. Error: CollapseNodes works (@test-tree-rearrange.R#162)  ─────────────────
  nodes must be integers between 9 and 13
  1: CollapseEdge(tree, 5L) at testthat/test-tree-rearrange.R:162
  2: CollapseNode(tree, tree$edge[edges, 2])
  3: stop("nodes must be integers between ", root + 1L, " and ", maxNode)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 6767 SKIPPED: 0 FAILED: 5
  1. Failure: UniqueSplits works (@test-Partitions.R#6) 
  2. Failure: NNI works (@test-tree-rearrange.R#18) 
  3. Failure: CollapseNodes works (@test-tree-rearrange.R#157) 
  4. Failure: CollapseNodes works (@test-tree-rearrange.R#160) 
  5. Error: CollapseNodes works (@test-tree-rearrange.R#162) 
  
  Error: testthat unit tests failed
  Execution halted