Running ‘spelling.R’ [0s/1s]
  Running ‘testthat.r’ [4s/6s]
Running the tests in ‘tests/testthat.r’ failed.
Complete output:
  > library(testthat)
  > library(sparsediscrim)
  > 
  > test_check("sparsediscrim")
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • empty test (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-data-convert.R:8:4): Bad predictor input ──────────────────────
  `sparsediscrim:::pred_to_matrix(iris)` threw an error with unexpected message.
  Expected match: "the matrix was no longer numeric"
  Actual message: "'x' should be a matrix or data frame."
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-data-convert.R:8:3
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. └─sparsediscrim:::pred_to_matrix(iris)
  ── Error (test-lda-diag.r:15:3): The DLDA classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_diag(...) test-lda-diag.r:15:2
   2. └─sparsediscrim:::lda_diag.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-diag.r:29:3): The DLDA classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_diag(...) test-lda-diag.r:29:2
   2. └─sparsediscrim:::lda_diag.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-eigen.r:15:3): The MDMP classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_eigen(...) test-lda-eigen.r:15:2
   2. └─sparsediscrim:::lda_eigen.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-eigen.r:29:3): The MDMP classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_eigen(...) test-lda-eigen.r:29:2
   2. └─sparsediscrim:::lda_eigen.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-emp-bayes-eigen.r:15:3): The MDMEB classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_emp_bayes_eigen(...) test-lda-emp-bayes-eigen.r:15:2
   2. └─sparsediscrim:::lda_emp_bayes_eigen.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-emp-bayes-eigen.r:29:3): The MDMEB classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_emp_bayes_eigen(...) test-lda-emp-bayes-eigen.r:29:2
   2. └─sparsediscrim:::lda_emp_bayes_eigen.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-emp-bayes.r:15:3): The MDEB classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_emp_bayes(...) test-lda-emp-bayes.r:15:2
   2. └─sparsediscrim:::lda_emp_bayes.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-emp-bayes.r:29:3): The MDEB classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_emp_bayes(...) test-lda-emp-bayes.r:29:2
   2. └─sparsediscrim:::lda_emp_bayes.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-pseudo.r:15:3): The lda_pseudo classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_pseudo(...) test-lda-pseudo.r:15:2
   2. └─sparsediscrim:::lda_pseudo.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-pseudo.r:29:3): The lda_pseudo classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_pseudo(...) test-lda-pseudo.r:29:2
   2. └─sparsediscrim:::lda_pseudo.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-schafer.r:15:3): The lda_schafer classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_schafer(...) test-lda-schafer.r:15:2
   2. └─sparsediscrim:::lda_schafer.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-schafer.r:29:3): The lda_schafer classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_schafer(...) test-lda-schafer.r:29:2
   2. └─sparsediscrim:::lda_schafer.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-shrink-cov.r:15:3): The SDLDA classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_shrink_cov(...) test-lda-shrink-cov.r:15:2
   2. └─sparsediscrim:::lda_shrink_cov.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-shrink-cov.r:29:3): The SDLDA classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_shrink_cov(...) test-lda-shrink-cov.r:29:2
   2. └─sparsediscrim:::lda_shrink_cov.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-shrink-mean.r:15:3): The SmDLDA classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_shrink_mean(...) test-lda-shrink-mean.r:15:2
   2. └─sparsediscrim:::lda_shrink_mean.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda-shrink-mean.r:29:3): The SmDLDA classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_shrink_mean(...) test-lda-shrink-mean.r:29:2
   2. └─sparsediscrim:::lda_shrink_mean.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda_thomaz.r:15:3): The lda_thomaz classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_thomaz(...) test-lda_thomaz.r:15:2
   2. └─sparsediscrim:::lda_thomaz.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-lda_thomaz.r:29:3): The lda_thomaz classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_thomaz(...) test-lda_thomaz.r:29:2
   2. └─sparsediscrim:::lda_thomaz.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-prediction-code.R:46:4): x/y method ─────────────────────────────
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_diag(x = scat[1:90, 6:12], y = scat$Species[1:90]) test-prediction-code.R:46:3
   2. └─sparsediscrim:::lda_diag.default(x = scat[1:90, 6:12], y = scat$Species[1:90])
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-qda-diag.r:15:3): The DQDA classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::qda_diag(...) test-qda-diag.r:15:2
   2. └─sparsediscrim:::qda_diag.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-qda-diag.r:29:3): The DQDA classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::qda_diag(...) test-qda-diag.r:29:2
   2. └─sparsediscrim:::qda_diag.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-qda-shrink-cov.r:15:3): The SDQDA classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_shrink_cov(...) test-qda-shrink-cov.r:15:2
   2. └─sparsediscrim:::lda_shrink_cov.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-qda-shrink-cov.r:29:3): The SDQDA classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_shrink_cov(...) test-qda-shrink-cov.r:29:2
   2. └─sparsediscrim:::lda_shrink_cov.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-qda-shrink-mean.r:15:3): The SmDQDA classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::qda_shrink_mean(...) test-qda-shrink-mean.r:15:2
   2. └─sparsediscrim:::qda_shrink_mean.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-qda-shrink-mean.r:29:3): The SmDQDA classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::qda_shrink_mean(...) test-qda-shrink-mean.r:29:2
   2. └─sparsediscrim:::qda_shrink_mean.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-rda-high-dim.r:17:3): The HDRDA classifier works properly on the iris data set ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::rda_high_dim(...) test-rda-high-dim.r:17:2
   2. └─sparsediscrim:::rda_high_dim.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-rda-high-dim.r:509:3): The HDRDA classifier works properly when 1 feature used ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::rda_high_dim(...) test-rda-high-dim.r:509:2
   2. └─sparsediscrim:::rda_high_dim.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  
  [ FAIL 28 | WARN 0 | SKIP 2 | PASS 141 ]
  Error: Test failures
  Execution halted