Running 'testthat.R' [9s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(canaper)
  > 
  > test_check("canaper")
  [1] "Dropping tips from the tree because they are not present in the community data:"
  [1] "sp5" "sp3"
  [1] "Dropping taxa from the community because they are not present in the phylogeny:"
  [1] "sp1" "sp2"
  [1] "Dropping taxa from the community because they are not present in the phylogeny:"
  [1] "sp1" "sp2"
  [1] "Dropping tips from the tree because they are not present in the community data:"
  [1] "sp5" "sp3"
  [ FAIL 9 | WARN 0 | SKIP 0 | PASS 99 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-calc_biodiv_random.R:14:3'): Random seeds work ─────────────────
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─canaper:::calc_biodiv_random(...) at test-calc_biodiv_random.R:14:2
   2. └─base::loadNamespace(x)
   3.   └─base::namespaceImportFrom(...)
   4.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  ── Error ('test-calc_biodiv_random.R:47:3'): Random seeds work in parallel ─────
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. └─future.apply::future_lapply(...) at test-calc_biodiv_random.R:47:2
   2.   └─future.apply:::future_xapply(...)
   3.     ├─future::value(fs)
   4.     └─future:::value.list(fs)
   5.       ├─future::resolve(...)
   6.       └─future:::resolve.list(...)
   7.         └─future (local) signalConditionsASAP(obj, resignal = FALSE, pos = ii)
   8.           └─future:::signalConditions(...)
  ── Error ('test-calc_biodiv_random.R:82:3'): Output is formatted as expected ───
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-calc_biodiv_random.R:82:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─assertr::not_na(...)
   5. ├─base::unlist(calc_biodiv_random(comm, phy, phy_alt, "swap", 1L))
   6. ├─canaper:::calc_biodiv_random(comm, phy, phy_alt, "swap", 1L)
   7. └─base::loadNamespace(x)
   8.   └─base::namespaceImportFrom(...)
   9.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  ── Error ('test-calc_biodiv_random.R:92:3'): Selected metric shows up in output ──
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─testthat::expect_named(...) at test-calc_biodiv_random.R:92:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─canaper:::calc_biodiv_random(...)
   5. └─base::loadNamespace(x)
   6.   └─base::namespaceImportFrom(...)
   7.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  ── Error ('test-cpr_classify_endem.R:12:1'): (code run outside of `test_that()`) ──
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─canaper::cpr_rand_test(...) at test-cpr_classify_endem.R:12:0
   2. └─base::loadNamespace(x)
   3.   └─base::namespaceImportFrom(...)
   4.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  ── Error ('test-cpr_rand_comm.R:100:3'): Silencing warnings works ──────────────
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-cpr_rand_comm.R:100:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─canaper::cpr_rand_test(...)
    8. └─base::loadNamespace(x)
    9.   └─base::namespaceImportFrom(...)
   10.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  ── Error ('test-cpr_rand_test.R:22:1'): (code run outside of `test_that()`) ────
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─canaper::cpr_rand_test(...) at test-cpr_rand_test.R:22:0
   2. └─base::loadNamespace(x)
   3.   └─base::namespaceImportFrom(...)
   4.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  ── Error ('test-get_ses.R:9:1'): (code run outside of `test_that()`) ───────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(1:100, ~calc_biodiv_random(comm, phy, phy_alt, "curveball", 
      1000L, metrics = "pe"))`: ℹ In index: 1.
  Caused by error:
  ! object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─purrr::map(...) at test-get_ses.R:9:0
    2. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    3. │   ├─purrr:::with_indexed_errors(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   ├─purrr:::call_with_cleanup(...)
    6. │   └─canaper (local) .f(.x[[i]], ...)
    7. │     └─canaper:::calc_biodiv_random(...)
    8. ├─base::loadNamespace(x)
    9. │ └─base::namespaceImportFrom(...)
   10. │   └─base::importIntoEnv(impenv, impnames, ns, impvars)
   11. │     └─base::stop(...)
   12. └─base::.handleSimpleError(...)
   13.   └─purrr (local) h(simpleError(msg, call))
   14.     └─cli::cli_abort(...)
   15.       └─rlang::abort(...)
  ── Error ('test-utils.R:114:3'): Matching community and phylogeny data works ───
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(...) at test-utils.R:114:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─base::loadNamespace(x)
   5.   └─base::namespaceImportFrom(...)
   6.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  
  [ FAIL 9 | WARN 0 | SKIP 0 | PASS 99 ]
  Error: Test failures
  Execution halted