Running 'testthat.R' [16s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(mtscr)
  > 
  > test_check("mtscr")
  Data must not be grouped.
  i It has been ungrouped.
  Removed NA values from `score`
  [ FAIL 7 | WARN 0 | SKIP 0 | PASS 42 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-mtscr_model.R:2:1'): (code run outside of `test_that()`) ───────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(formulas, function(formula) {
      glmmTMB::glmmTMB(formula, data = df, family = stats::gaussian())
  })`: ℹ In index: 1.
  Caused by error:
  ! object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─mtscr::mtscr_model(mtscr_creativity, id, item, SemDis_MEAN, top = 1) at test-mtscr_model.R:2:0
    2. │ └─purrr::map(...)
    3. │   └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    4. │     ├─purrr:::with_indexed_errors(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     ├─purrr:::call_with_cleanup(...)
    7. │     └─mtscr (local) .f(.x[[i]], ...)
    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-mtscr_model_summary.R:2:3'): model is summarised ───────────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(formulas, function(formula) {
      glmmTMB::glmmTMB(formula, data = df, family = stats::gaussian())
  })`: i In index: 1.
  Caused by error:
  ! object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─mtscr::mtscr_model_summary(...) at test-mtscr_model_summary.R:2:2
    2. │ └─methods::is(model, "list")
    3. ├─mtscr::mtscr_model(mtscr_creativity, id, item, SemDis_MEAN, top = 1:3)
    4. │ └─purrr::map(...)
    5. │   └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    6. │     ├─purrr:::with_indexed_errors(...)
    7. │     │ └─base::withCallingHandlers(...)
    8. │     ├─purrr:::call_with_cleanup(...)
    9. │     └─mtscr (local) .f(.x[[i]], ...)
   10. ├─base::loadNamespace(x)
   11. │ └─base::namespaceImportFrom(...)
   12. │   └─base::importIntoEnv(impenv, impnames, ns, impvars)
   13. │     └─base::stop(...)
   14. └─base::.handleSimpleError(...)
   15.   └─purrr (local) h(simpleError(msg, call))
   16.     └─cli::cli_abort(...)
   17.       └─rlang::abort(...)
  ── Error ('test-mtscr_score.R:7:3'): format argument works as expected for full ──
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(formulas, function(formula) {
      glmmTMB::glmmTMB(formula, data = df, family = stats::gaussian())
  })`: i In index: 1.
  Caused by error:
  ! object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─mtscr::mtscr_score(...) at test-mtscr_score.R:7:2
    2. │ └─mtscr::mtscr_model(...)
    3. │   └─purrr::map(...)
    4. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    5. │       ├─purrr:::with_indexed_errors(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       ├─purrr:::call_with_cleanup(...)
    8. │       └─mtscr (local) .f(.x[[i]], ...)
    9. ├─base::loadNamespace(x)
   10. │ └─base::namespaceImportFrom(...)
   11. │   └─base::importIntoEnv(impenv, impnames, ns, impvars)
   12. │     └─base::stop(...)
   13. └─base::.handleSimpleError(...)
   14.   └─purrr (local) h(simpleError(msg, call))
   15.     └─cli::cli_abort(...)
   16.       └─rlang::abort(...)
  ── Error ('test-mtscr_score.R:19:3'): format argument works as expected for minimal ──
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(formulas, function(formula) {
      glmmTMB::glmmTMB(formula, data = df, family = stats::gaussian())
  })`: i In index: 1.
  Caused by error:
  ! object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─mtscr::mtscr_score(...) at test-mtscr_score.R:19:2
    2. │ └─mtscr::mtscr_model(...)
    3. │   └─purrr::map(...)
    4. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    5. │       ├─purrr:::with_indexed_errors(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       ├─purrr:::call_with_cleanup(...)
    8. │       └─mtscr (local) .f(.x[[i]], ...)
    9. ├─base::loadNamespace(x)
   10. │ └─base::namespaceImportFrom(...)
   11. │   └─base::importIntoEnv(impenv, impnames, ns, impvars)
   12. │     └─base::stop(...)
   13. └─base::.handleSimpleError(...)
   14.   └─purrr (local) h(simpleError(msg, call))
   15.     └─cli::cli_abort(...)
   16.       └─rlang::abort(...)
  ── Error ('test-mtscr_score.R:34:3'): .creativity_score columns are numeric ────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(formulas, function(formula) {
      glmmTMB::glmmTMB(formula, data = df, family = stats::gaussian())
  })`: i In index: 1.
  Caused by error:
  ! object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─mtscr::mtscr_score(mtscr_creativity, id, item, SemDis_MEAN, top = 1) at test-mtscr_score.R:34:2
    2. │ └─mtscr::mtscr_model(...)
    3. │   └─purrr::map(...)
    4. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    5. │       ├─purrr:::with_indexed_errors(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       ├─purrr:::call_with_cleanup(...)
    8. │       └─mtscr (local) .f(.x[[i]], ...)
    9. ├─base::loadNamespace(x)
   10. │ └─base::namespaceImportFrom(...)
   11. │   └─base::importIntoEnv(impenv, impnames, ns, impvars)
   12. │     └─base::stop(...)
   13. └─base::.handleSimpleError(...)
   14.   └─purrr (local) h(simpleError(msg, call))
   15.     └─cli::cli_abort(...)
   16.       └─rlang::abort(...)
  ── Error ('test-mtscr_score.R:129:3'): works the same with quoted and unquoted column names ──
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(formulas, function(formula) {
      glmmTMB::glmmTMB(formula, data = df, family = stats::gaussian())
  })`: i In index: 1.
  Caused by error:
  ! object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─mtscr::mtscr_score(mtscr_creativity, "id", "item", "SemDis_MEAN") at test-mtscr_score.R:129:2
    2. │ └─mtscr::mtscr_model(...)
    3. │   └─purrr::map(...)
    4. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    5. │       ├─purrr:::with_indexed_errors(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       ├─purrr:::call_with_cleanup(...)
    8. │       └─mtscr (local) .f(.x[[i]], ...)
    9. ├─base::loadNamespace(x)
   10. │ └─base::namespaceImportFrom(...)
   11. │   └─base::importIntoEnv(impenv, impnames, ns, impvars)
   12. │     └─base::stop(...)
   13. └─base::.handleSimpleError(...)
   14.   └─purrr (local) h(simpleError(msg, call))
   15.     └─cli::cli_abort(...)
   16.       └─rlang::abort(...)
  ── Error ('test-mtscr_score.R:144:3'): works if item column is omitted ─────────
  <purrr_error_indexed/rlang_error/error/condition>
  Error in `purrr::map(formulas, function(formula) {
      glmmTMB::glmmTMB(formula, data = df, family = stats::gaussian())
  })`: i In index: 1.
  Caused by error:
  ! object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─mtscr::mtscr_score(df_filtered, id, item, score) at test-mtscr_score.R:144:2
    2. │ └─mtscr::mtscr_model(...)
    3. │   └─purrr::map(...)
    4. │     └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
    5. │       ├─purrr:::with_indexed_errors(...)
    6. │       │ └─base::withCallingHandlers(...)
    7. │       ├─purrr:::call_with_cleanup(...)
    8. │       └─mtscr (local) .f(.x[[i]], ...)
    9. ├─base::loadNamespace(x)
   10. │ └─base::namespaceImportFrom(...)
   11. │   └─base::importIntoEnv(impenv, impnames, ns, impvars)
   12. │     └─base::stop(...)
   13. └─base::.handleSimpleError(...)
   14.   └─purrr (local) h(simpleError(msg, call))
   15.     └─cli::cli_abort(...)
   16.       └─rlang::abort(...)
  
  [ FAIL 7 | WARN 0 | SKIP 0 | PASS 42 ]
  Error: Test failures
  Execution halted