Running ‘testthat.R’ [80s/117s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(diceR)
  > 
  > test_check("diceR")
  ── 1. Error: reweighing (potentially) replicates each slice of algorithm (@test-
  invalid 'times' argument
  1: consensus_evaluate(x, CC1, CC2, CC3, ref.cl = ref.cl, trim = TRUE, reweigh = TRUE, 
         n = 2) at testthat/test-consensus_combine.R:51
  2: purrr::map(k, consensus_trim, E = E, ii = ii, k.method = k.method, reweigh = reweigh, 
         n = n) %>% purrr::transpose() %>% purrr::map_at(c("alg.keep", "alg.remove"), 
         ~unlist(unique(.x)))
  3: eval(lhs, parent, parent)
  4: eval(lhs, parent, parent)
  5: purrr::map(k, consensus_trim, E = E, ii = ii, k.method = k.method, reweigh = reweigh, 
         n = n)
  6: .f(.x[[i]], ...)
  7: consensus_reweigh(E.new, rank.obj, alg.keep, alg.all)
  8: E.new %>% purrr::array_branch(c(3, 4)) %>% purrr::map2(multiples, ~rep(list(.x), 
         .y)) %>% purrr::map(abind::abind, along = 3) %>% abind::abind(along = 3) %>% 
         abind::abind(along = 4) %>% `dimnames<-`(append(dimnames(E.new)[-3], list(purrr::flatten_chr(purrr::imap(multiples, 
         ~rep(.y, .x)))), 2))
  9: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  10: eval(quote(`_fseq`(`_lhs`)), env, env)
  11: eval(quote(`_fseq`(`_lhs`)), env, env)
  12: `_fseq`(`_lhs`)
  13: freduce(value, `_function_list`)
  14: function_list[[i]](value)
  15: purrr::map2(., multiples, ~rep(list(.x), .y))
  16: .f(.x[[i]], .y[[i]], ...)
  
  Selecting k and imputing non-clustered cases
  Computing consensus functions
  Evaluating output with consensus function results
  Diverse Cluster Ensemble Completed
  Selecting k and imputing non-clustered cases
  Computing consensus functions
  Evaluating output with consensus function results
  Diverse Cluster Ensemble Completed
  Selecting k and imputing non-clustered cases
  Computing consensus functions
  Evaluating output with consensus function results
  Diverse Cluster Ensemble Completed
  Selecting k and imputing non-clustered cases
  Computing consensus functions
  Diverse Cluster Ensemble Completed
  Selecting k and imputing non-clustered cases
  Computing consensus functions
  Diverse Cluster Ensemble Completed
  Selecting k and imputing non-clustered cases
  Computing consensus functions
  Diverse Cluster Ensemble Completed
  Selecting k and imputing non-clustered cases
  Computing consensus functions
  Diverse Cluster Ensemble Completed
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 108 SKIPPED: 0 FAILED: 1
  1. Error: reweighing (potentially) replicates each slice of algorithm (@test-consensus_combine.R#51) 
  
  Error: testthat unit tests failed
  Execution halted