Running 'testthat.R' [17s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > Sys.unsetenv("R_TESTS")
  > if (require(testthat, quietly = TRUE)) {
  +   require(stan4bart)
  +   test_check("stan4bart")
  + } else {
  +   cat("package 'testthat' not available; cannot run unit tests\n")
  + }
  Loading required package: stan4bart
  Loading required package: dbarts
  [ FAIL 12 | WARN 1 | SKIP 4 | PASS 99 ]
  
  ══ Skipped tests (4) ═══════════════════════════════════════════════════════════
  • On CRAN (4): 'test-01-continuous.R:115:3', 'test-01-continuous.R:154:3',
    'test-02-binary.R:33:3', 'test-02-binary.R:128:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-01-continuous.R:27:3'): extract matches fitted in causal setting model ──
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─dbarts::extract(fit) at test-01-continuous.R:27:2
   2. └─stan4bart:::extract.stan4bartFit(fit)
   3.   └─stan4bart:::fitted_random(...)
   4.     └─base::array(...)
  ── Error ('test-01-continuous.R:213:3'): predict matches supplied data ─────────
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─stats::predict(fit, df.train, type = "indiv.ranef") at test-01-continuous.R:213:2
   2. └─stan4bart:::predict.stan4bartFit(fit, df.train, type = "indiv.ranef")
   3.   └─stan4bart:::fitted_random(object, testData$reTrms, FALSE, sample_new_levels)
   4.     └─base::array(...)
  ── Error ('test-01-continuous.R:250:3'): ppd has approximately right amount of noise ──
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─dbarts::extract(fit) at test-01-continuous.R:250:2
   2. └─stan4bart:::extract.stan4bartFit(fit)
   3.   └─stan4bart:::fitted_random(...)
   4.     └─base::array(...)
  ── Error ('test-02-binary.R:21:3'): extract matches fitted in causal setting model ──
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─dbarts::extract(fit) at test-02-binary.R:21:2
   2. └─stan4bart:::extract.stan4bartFit(fit)
   3.   └─stan4bart:::fitted_random(...)
   4.     └─base::array(...)
  ── Error ('test-02-binary.R:99:3'): predict matches supplied data ──────────────
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─stats::predict(fit, df.train, type = "indiv.ranef") at test-02-binary.R:99:2
   2. └─stan4bart:::predict.stan4bartFit(fit, df.train, type = "indiv.ranef")
   3.   └─stan4bart:::fitted_random(object, testData$reTrms, FALSE, sample_new_levels)
   4.     └─base::array(...)
  ── Error ('test-03-na_action.R:33:5'): na.action = na.omit works correctly ─────
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─stats::fitted(fit, type = type) at test-03-na_action.R:33:4
   2. └─stan4bart:::fitted.stan4bartFit(fit, type = type)
   3.   ├─dbarts::extract(...)
   4.   └─stan4bart:::extract.stan4bartFit(...)
   5.     └─stan4bart:::fitted_random(...)
   6.       └─base::array(...)
  ── Error ('test-03-na_action.R:53:3'): na.action = na.exclude works correctly ──
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─stats::fitted(fit, type = "indiv.ranef") at test-03-na_action.R:53:2
   2. └─stan4bart:::fitted.stan4bartFit(fit, type = "indiv.ranef")
   3.   ├─dbarts::extract(...)
   4.   └─stan4bart:::extract.stan4bartFit(...)
   5.     └─stan4bart:::fitted_random(...)
   6.       └─base::array(...)
  ── Error ('test-04-factor_levels.R:29:5'): model fits with empty factor levels ──
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─stats::fitted(fit, type = type) at test-04-factor_levels.R:29:4
   2. └─stan4bart:::fitted.stan4bartFit(fit, type = type)
   3.   ├─dbarts::extract(...)
   4.   └─stan4bart:::extract.stan4bartFit(...)
   5.     └─stan4bart:::fitted_random(...)
   6.       └─base::array(...)
  ── Error ('test-10-treatment.R:19:3'): works with logical treatment ────────────
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─testthat::expect_is(fitted(fit, sample = "test"), "numeric") at test-10-treatment.R:19:2
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. ├─stats::fitted(fit, sample = "test")
   5. └─stan4bart:::fitted.stan4bartFit(fit, sample = "test")
   6.   ├─dbarts::extract(...)
   7.   └─stan4bart:::extract.stan4bartFit(...)
   8.     └─stan4bart:::fitted_random(...)
   9.       └─base::array(...)
  ── Error ('test-11-callback.R:44:3'): callback is passed sample correctly ──────
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─stan4bart::stan4bart(...) at test-11-callback.R:44:2
   2. │ └─stan4bart:::stan4bart_fit(...)
   3. │   └─stan4bart:::stan4bart_fit_worker(...)
   4. └─`<fn>`(`<dbl>`, `<dbl>`, `<dbl>`)
   5.   └─base::as.vector(Matrix::crossprod(rho$test$reTrms$Zt, ranef)) at test-11-callback.R:29:2
  ── Error ('test-11-callback.R:104:3'): callback works with multiple threads ────
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─stan4bart::stan4bart(...) at test-11-callback.R:104:2
   2. │ └─stan4bart:::stan4bart_fit(...)
   3. │   └─stan4bart:::stan4bart_fit_worker(...)
   4. └─`<fn>`(`<dbl>`, `<dbl>`, `<dbl>`)
   5.   └─base::as.vector(Matrix::crossprod(rho$test$reTrms$Zt, ranef)) at test-11-callback.R:29:2
  ── Error ('test-11-callback.R:159:3'): callback works with multiple dimmed results ──
  Error: 'crossprod' is not an exported object from 'namespace:Matrix'
  Backtrace:
      ▆
   1. ├─stan4bart::stan4bart(...) at test-11-callback.R:159:2
   2. │ └─stan4bart:::stan4bart_fit(...)
   3. │   └─stan4bart:::stan4bart_fit_worker(...)
   4. └─`<fn>`(`<dbl>`, `<dbl>`, `<dbl>`)
   5.   └─base::as.vector(Matrix::crossprod(rho$test$reTrms$Zt, ranef)) at test-11-callback.R:147:2
  
  [ FAIL 12 | WARN 1 | SKIP 4 | PASS 99 ]
  Error: Test failures
  Execution halted