Running ‘testthat.R’ [5s/8s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(banter)
  Loading required package: magrittr
  
  Attaching package: 'magrittr'
  
  The following objects are masked from 'package:testthat':
  
      equals, is_less_than, not
  
  Welcome to banter v0.9.5
  See `banterGuide()` for a tutorial.
  > 
  > test_check("banter")
  [ FAIL 1 | WARN 10 | SKIP 0 | PASS 4 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-accessors.R:19'): getSampSize returns correct sample sizes ─────
  Error in `class(z) <- oldClass(x)`: invalid to set the class to matrix unless the dimension attribute is of length 2 (was 1)
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(runBanterModel(mdl, ntree = 50, sampsize = 1)) at test-accessors.R:19: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. ├─banter::runBanterModel(mdl, ntree = 50, sampsize = 1)
    7. │ ├─... %>% .meanVotes()
    8. │ └─base::sapply(...)
    9. │   └─base::lapply(X = X, FUN = FUN, ...)
   10. │     └─banter (local) FUN(X[[i]], ...)
   11. │       └─d@model$votes %>% prop.table(1) %>% as.data.frame()
   12. ├─banter:::.meanVotes(.)
   13. │ ├─... %>% ...
   14. │ └─base::sapply(...)
   15. │   └─base::lapply(X = X, FUN = FUN, ...)
   16. ├─tidyr::pivot_wider(., names_from = "species", values_from = "prob.mean")
   17. ├─dplyr::bind_rows(.)
   18. │ └─rlang::list2(...)
   19. ├─base::as.data.frame(.)
   20. └─base::prop.table(., 1)
   21.   ├─base::sweep(x, margin, marginSums(x, margin), `/`, check.margin = FALSE)
   22.   │ ├─base::aperm(array(STATS, dims[perm]), order(perm))
   23.   │ └─base::array(STATS, dims[perm])
   24.   └─base::marginSums(x, margin)
  
  [ FAIL 1 | WARN 10 | SKIP 0 | PASS 4 ]
  Error: Test failures
  Execution halted