Running ‘spelling.R’ [0s/1s]
  Running ‘testthat.R’ [52s/62s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("TreeSearch")
  > 
  > test_check("TreeSearch")
  [ FAIL 12 | WARN 29 | SKIP 3 | PASS 2782 ]
  
  ══ Skipped tests (3) ═══════════════════════════════════════════════════════════
  • On CRAN (3): 'test-Jackknife.R:42:3', 'test-PlotCharacter.R:47:3',
    'test-PlotCharacter.R:119:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-CustomSearch.R:17:3'): Tree can be found ───────────────────────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-CustomSearch.R:17:2
   2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─TreeSearch::TreeSearch(...)
   5.   └─TreeSearch::EdgeListSearch(...)
   6.     └─TreeSearch::RearrangeEdges(...)
   7.       └─TreeSearch (local) EdgeSwapper(parent, child)
   8.         └─TreeTools::DescendantEdges(1, parent, child, nEdge)
  ── Error ('test-CustomSearch.R:68:3'): Tree search finds shortest tree ─────────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-CustomSearch.R:68:2
   2. │ └─testthat::quasi_label(enquo(expected), expected.label, arg = "expected")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─TreeSearch::TreeSearch(...)
   5.   └─TreeSearch::EdgeListSearch(...)
   6.     └─TreeSearch::RearrangeEdges(...)
   7.       └─TreeSearch (local) EdgeSwapper(parent, child)
   8.         └─TreeSearch::.NonDuplicateRoot(parent, child, nEdge)
   9.           └─TreeTools::DescendantEdges(1, parent, child, nEdge)
  ── Error ('test-CustomSearch.R:126:3'): Profile parsimony works in tree search ──
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. └─TreeSearch::Ratchet(...) at test-CustomSearch.R:126:2
   2.   └─TreeSearch::EdgeListSearch(...)
   3.     └─TreeSearch::RearrangeEdges(...)
   4.       └─TreeSearch (local) EdgeSwapper(parent, child)
   5.         └─TreeTools::DescendantEdges(1, parent, child, nEdge)
  ── Error ('test-Jackknife.R:17:3'): Jackknife supports are correct ─────────────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. └─TreeSearch::TreeSearch(start_tree, dataset, verbosity = 0) at test-Jackknife.R:17:2
   2.   └─TreeSearch::EdgeListSearch(...)
   3.     └─TreeSearch::RearrangeEdges(...)
   4.       └─TreeSearch (local) EdgeSwapper(parent, child)
   5.         └─TreeTools::DescendantEdges(1, parent, child, nEdge)
  ── Error ('test-zzz-tree-rearrange.R:70:3'): SPR works ─────────────────────────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. └─TreeSearch (local) Test(0, 1, 5) at test-zzz-tree-rearrange.R:70:2
   2.   ├─TreeTools::SortTree(root(SPR(testTree, p1, r1), "t1", resolve.root = TRUE)) at test-zzz-tree-rearrange.R:67:4
   3.   ├─ape::root(SPR(testTree, p1, r1), "t1", resolve.root = TRUE)
   4.   └─TreeSearch::SPR(testTree, p1, r1)
   5.     └─TreeSearch::SPRSwap(...)
   6.       └─TreeSearch::.NonDuplicateRoot(parent, child, nEdge)
   7.         └─TreeTools::DescendantEdges(1, parent, child, nEdge)
  ── Error ('test-zzz-tree-rearrange.R:135:3'): TBR can swap over root ───────────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(TBR(tree5a, 1, c(7, 1)), read.tree(text = "(a, (d, (e, (c, b))));")) at test-zzz-tree-rearrange.R:135:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─TreeSearch::TBR(tree5a, 1, c(7, 1))
   5.   └─TreeSearch::TBRSwap(...)
   6.     └─TreeTools::DescendantEdges(edgeToBreak, parent, child, nEdge)
  ── Error ('test-zzz-tree-rearrange.R:160:3'): TBR works ────────────────────────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(TBR(tree, 6, c(1, 6)), read.tree(text = "((((a, b), (e, f)), (c, d)), (g, h));")) at test-zzz-tree-rearrange.R:160:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─TreeSearch::TBR(tree, 6, c(1, 6))
   5.   └─TreeSearch::TBRSwap(...)
   6.     └─TreeTools::DescendantEdges(edgeToBreak, parent, child, nEdge)
  ── Error ('test-zzz-tree-rearrange.R:199:3'): RootedTBR fails ──────────────────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-zzz-tree-rearrange.R:199:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─TreeSearch::TBR(tree8, 4, c(3, 7))
   5.   └─TreeSearch::TBRSwap(...)
   6.     └─TreeTools::DescendantEdges(edgeToBreak, parent, child, nEdge)
  ── Error ('test-zzz-tree-rearrange.R:210:3'): RootedSPR fails ──────────────────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─testthat::expect_warning(RootedSPR(read.tree(text = "((a, b), (c, d));"))) at test-zzz-tree-rearrange.R:210:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat (local) .capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─TreeSearch::RootedSPR(read.tree(text = "((a, b), (c, d));"))
   7.   └─TreeSearch::RootedSPRSwap(...)
   8.     └─TreeTools::DescendantEdges(1, parent, child, nEdge)
  ── Error ('test-zzz-tree-rearrange.R:224:3'): SPR is special case of TBR ───────
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-zzz-tree-rearrange.R:224:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─TreeSearch::SPR(tree11, 3, 9)
   5.   └─TreeSearch::SPRSwap(...)
   6.     └─TreeSearch::.NonDuplicateRoot(parent, child, nEdge)
   7.       └─TreeTools::DescendantEdges(1, parent, child, nEdge)
  ── Error ('test-zzz-tree-rearrange.R:264:3'): SPR trees conform to phylo expectations ──
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─TreeSearch (local) CheckTreeSanity(small_tree <- SPR(small_tree)) at test-zzz-tree-rearrange.R:264:2
   2. └─TreeSearch::SPR(small_tree) at test-zzz-tree-rearrange.R:232:2
   3.   └─TreeSearch::SPRSwap(...)
   4.     └─TreeSearch::.NonDuplicateRoot(parent, child, nEdge)
   5.       └─TreeTools::DescendantEdges(1, parent, child, nEdge)
  ── Error ('test-zzz-tree-rearrange.R:268:3'): TBR trees conform to phylo expectations ──
  Error in `if (edgeSister >= edge) {
      ret[edge:edgeSister] <- TRUE
      ret
  } else {
      nextEdge <- edge
      revParent <- rev(parent)
      repeat {
          if (revDescendant <- match(child[nextEdge], revParent, 
              nomatch = FALSE)) {
              nextEdge <- 1 + nEdge - revDescendant
          }
          else break
      }
      ret[edge:nextEdge] <- TRUE
      ret
  }`: the condition has length > 1
  Backtrace:
      ▆
   1. ├─TreeSearch (local) CheckTreeSanity(small_tree <- TBR(small_tree)) at test-zzz-tree-rearrange.R:268:2
   2. └─TreeSearch::TBR(small_tree) at test-zzz-tree-rearrange.R:232:2
   3.   └─TreeSearch::TBRSwap(...)
   4.     └─TreeTools::DescendantEdges(edgeToBreak, parent, child, nEdge)
  
  [ FAIL 12 | WARN 29 | SKIP 3 | PASS 2782 ]
  Deleting unused snapshots:
  • PlotCharacter/plotchar-000011110000.svg
  • PlotCharacter/plotchar-000011qqqq00.svg
  • PlotCharacter/plotchar-011iiqii0011.svg
  • PlotCharacter/plotchar-01iii1010101.svg
  • PlotCharacter/plotchar-01iiii010101.svg
  • PlotCharacter/plotchar-01iiiiii0101.svg
  • PlotCharacter/plotchar-023iiqq1ii32.svg
  • PlotCharacter/plotchar-023iqqq1ii32.svg
  • PlotCharacter/plotchar-10101iiiii01.svg
  • PlotCharacter/plotchar-10iiii11iii1.svg
  • PlotCharacter/plotchar-1100iiii1100.svg
  • PlotCharacter/plotchar-110iiqiii100.svg
  • PlotCharacter/plotchar-110iiqqii100.svg
  • PlotCharacter/plotchar-11ii1000001i.svg
  • PlotCharacter/plotchar-11ii1qqii111.svg
  • PlotCharacter/plotchar-11iiii111111.svg
  • PlotCharacter/plotchar-11iiiiiii100.svg
  • PlotCharacter/plotchar-11iiqqqqii11.svg
  • PlotCharacter/plotchar-1234d45baacgttt.svg
  • PlotCharacter/plotchar-1iii1111iii1.svg
  • PlotCharacter/plotchar-1iiii1iiii1i.svg
  • PlotCharacter/plotchar-1qqiiqqii100.svg
  • PlotCharacter/plotchar-210210iiiiii.svg
  • PlotCharacter/plotchar-210ii100ii21.svg
  • PlotCharacter/plotchar-21ii1iiii012.svg
  • PlotCharacter/plotchar-21ii3qqii032.svg
  • PlotCharacter/plotchar-230iiqq1ii32.svg
  • PlotCharacter/plotchar-23ii1iiii032.svg
  • PlotCharacter/plotchar-23ii1q1ii023.svg
  • PlotCharacter/plotchar-23ii1qqdi0bid01b32.svg
  • PlotCharacter/plotchar-23qq1qqqq032.svg
  • PlotCharacter/plotchar-320iiqq3ii21.svg
  • PlotCharacter/plotchar-i1i1i1ii1i1i.svg
  • PlotCharacter/plotchar-iiii1010iiii.svg
  • PlotCharacter/plotchar-iiii1111iii1.svg
  • PlotCharacter/plotchar-iiii1111iiii.svg
  • PlotCharacter/plotchar-iiiiii11iii1.svg
  • PlotCharacter/plotchar-iiiiiiii0101.svg
  • PlotCharacter/plotchar-iiiiiiiiiiii.svg
  • PlotCharacter/plotchar-iiiiiiiqqqqq.svg
  • PlotCharacter/plotchar-qqqqiiii1qqq.svg
  • PlotCharacter/plotchar-qqqqqqqqqqqq.svg
  Error: Test failures
  Execution halted