Running 'testthat.R' [13s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > options(Matrix.warnDeprecatedCoerce = 2)
  > 
  > library(testthat)
  > library(sdmTMB)
  > 
  > test_check("sdmTMB")
  Starting 2 test processes
  [ FAIL 3 | WARN 0 | SKIP 106 | PASS 68 ]
  
  ══ Skipped tests (106) ═════════════════════════════════════════════════════════
  • INLA cannot be loaded (4): 'test-1-fit-basic.R:12:3',
    'test-1-fit-basic.R:151:3', 'test-2-fit-less-basic.R:251:3',
    'test-control.R:8:3'
  • On CRAN (102): 'test-1-fit-basic.R:130:3', 'test-1-fit-basic.R:181:3',
    'test-1-fit-basic.R:225:3', 'test-3-families.R:206:3',
    'test-4-index-calculation.R:4:3', 'test-5-residuals.R:21:3',
    'test-5-residuals.R:185:3', 'test-2-fit-less-basic.R:2:3',
    'test-2-fit-less-basic.R:34:3', 'test-2-fit-less-basic.R:88:3',
    'test-2-fit-less-basic.R:106:3', 'test-2-fit-less-basic.R:179:3',
    'test-2-fit-less-basic.R:199:3', 'test-2-fit-less-basic.R:260:3',
    'test-2-fit-less-basic.R:291:3', 'test-2-fit-less-basic.R:311:3',
    'test-2-fit-less-basic.R:336:3', 'test-2-fit-less-basic.R:382:3',
    'test-2-fit-less-basic.R:395:3', 'test-2-fit-less-basic.R:450:3',
    'test-6-tmb-simulation.R:3:3', 'test-6-tmb-simulation.R:37:3',
    'test-6-tmb-simulation.R:74:3', 'test-6-tmb-simulation.R:128:3',
    'test-7-visreg.R:2:3', 'test-8-delta2.R:2:3', 'test-8-delta2.R:79:3',
    'test-8-delta2.R:150:3', 'test-8-delta2.R:258:3', 'test-8-delta2.R:353:3',
    'test-8-delta2.R:434:3', 'test-9-mvn-simulation.R:2:3',
    'test-9-mvn-simulation.R:28:3', 'test-9-mvn-simulation.R:55:3',
    'test-9-mvn-simulation.R:140:3', 'test-9-mvn-simulation.R:167:3',
    'test-9-mvn-simulation.R:242:3', 'test-cross-validation.R:3:3',
    'test-cross-validation.R:53:3', 'test-cross-validation.R:83:3',
    'test-deprecated-args.R:2:3', 'test-deprecated-args.R:68:3',
    'test-dharma.R:3:3', 'test-extra-optimization.R:2:3',
    'test-forecasting.R:2:3', 'test-link-prediction.R:4:3',
    'test-link-prediction.R:66:3', 'test-links.R:2:3', 'test-mix.R:3:3',
    'test-mix.R:45:3', 'test-mix.R:61:3', 'test-mix.R:79:3', 'test-mix.R:98:3',
    'test-nonstationary.R:118:3', 'test-nonstationary.R:165:3',
    'test-nonstationary.R:213:3', 'test-nonstationary.R:242:3',
    'test-nonstationary.R:294:3', 'test-offset.R:2:3', 'test-offset.R:21:3',
    'test-offset.R:85:3', 'test-parameter-bounds.R:11:3',
    'test-prediction-missing-years.R:2:3', 'test-random-intercepts.R:11:3',
    'test-random-intercepts.R:117:3', 'test-priors.R:23:3', 'test-priors.R:71:3',
    'test-reml.R:2:3', 'test-reml.R:75:3', 'test-sanity.R:2:3',
    'test-sdmTMB-simulate.R:2:3', 'test-spatial-varying.R:2:3',
    'test-threshold-models.R:2:3', 'test-threshold-models.R:19:3',
    'test-threshold-models.R:34:3', 'test-time-varying.R:2:3',
    'test-tmb-simulation.R:3:3', 'test-tmb-simulation.R:37:3',
    'test-tmb-simulation.R:76:3', 'test-tmb-simulation.R:128:3',
    'test-utm-conversions.R:2:3', 'test-without-spatial.R:2:3',
    'test-smooths.R:4:3', 'test-smooths.R:17:3', 'test-smooths.R:54:3',
    'test-smooths.R:93:3', 'test-smooths.R:133:3', 'test-smooths.R:201:3',
    'test-smooths.R:253:3', 'test-smooths.R:277:3', 'test-smooths.R:301:3',
    'test-smooths.R:323:3', 'test-smooths.R:346:3', 'test-smooths.R:368:3',
    'test-smooths.R:386:3', 'test-smooths.R:404:3', 'test-smooths.R:422:3',
    'test-smooths.R:440:3', 'test-smooths.R:452:3', 'test-smooths.R:470:3',
    'test-smooths.R:490:3', 'test-smooths.R:507:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-3-families.R:305:3'): Binomial simulation/residuals works with weights argument or cbind() ──
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─sdmTMB::sdmTMB(...) at test-3-families.R:305:2
   2. └─base::loadNamespace(x)
   3.   └─base::namespaceImportFrom(...)
   4.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  ── Error ('test-5-residuals.R:237:3'): Pearson residuals work ──────────────────
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─sdmTMB::sdmTMB(...) at test-5-residuals.R:237:2
   2. └─base::loadNamespace(x)
   3.   └─base::namespaceImportFrom(...)
   4.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  ── Error ('test-random-intercepts.R:179:3'): random slopes throw an error ──────
  Error: object 'crossprod' is not exported by 'namespace:Matrix'
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-random-intercepts.R:179: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. ├─sdmTMB::sdmTMB(...) at test-random-intercepts.R:180:4
    8. └─base::loadNamespace(x)
    9.   └─base::namespaceImportFrom(...)
   10.     └─base::importIntoEnv(impenv, impnames, ns, impvars)
  
  [ FAIL 3 | WARN 0 | SKIP 106 | PASS 68 ]
  Error: Test failures
  Execution halted