Running ‘spelling.R’
  Running ‘testthat.R’ [21s/63s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(discrim)
  Loading required package: parsnip
  > 
  > test_check("discrim")
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-flexible.R:23:3): model object ────────────────────────────────
  `xy_fit <- fit_xy(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-flexible.R:23:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-flexible.R:27:3): model object ──────────────────────────────────
  Error in `eval_bare(expr, quo_get_env(quo))`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─testthat::expect_equal(xy_fit$fit$theta.mod, exp_f_fit$theta.mod) test-flexible.R:27:2
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure (test-flexible.R:46:3): class predictions ───────────────────────────
  `xy_fit <- fit_xy(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-flexible.R:46:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-flexible.R:50:3): class predictions ─────────────────────────────
  Error in `predict(xy_fit, glass_te)`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, glass_te) test-flexible.R:50:2
  ── Failure (test-flexible.R:74:3): prob predictions ────────────────────────────
  `xy_fit <- fit_xy(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-flexible.R:74:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(fda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-flexible.R:78:3): prob predictions ──────────────────────────────
  Error in `predict(xy_fit, glass_te, type = "prob")`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, glass_te, type = "prob") test-flexible.R:78:2
  ── Failure (test-linear-fda.R:24:3): model object ──────────────────────────────
  `xy_fit <- fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-linear-fda.R:24:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-linear-fda.R:28:3): model object ────────────────────────────────
  Error in `eval_bare(expr, quo_get_env(quo))`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─testthat::expect_equal(xy_fit$fit$theta.mod, exp_f_fit$theta.mod) test-linear-fda.R:28:2
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure (test-linear-fda.R:47:3): class predictions ─────────────────────────
  `xy_fit <- fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-linear-fda.R:47:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-linear-fda.R:51:3): class predictions ───────────────────────────
  Error in `predict(xy_fit, glass_te)`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, glass_te) test-linear-fda.R:51:2
  ── Failure (test-linear-fda.R:75:3): prob predictions ──────────────────────────
  `xy_fit <- fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-linear-fda.R:75:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-linear-fda.R:79:3): prob predictions ────────────────────────────
  Error in `predict(xy_fit, glass_te, type = "prob")`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, glass_te, type = "prob") test-linear-fda.R:79:2
  ── Failure (test-linear-lda.R:26:3): model object ──────────────────────────────
  `xy_fit <- fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-linear-lda.R:26:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Failure (test-linear-lda.R:57:3): class predictions ─────────────────────────
  `xy_fit <- fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-linear-lda.R:57:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-linear-lda.R:61:3): class predictions ───────────────────────────
  Error in `predict(xy_fit, glass_te)`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, glass_te) test-linear-lda.R:61:2
  ── Failure (test-linear-lda.R:93:3): prob predictions ──────────────────────────
  `xy_fit <- fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-linear-lda.R:93:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(lda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-linear-lda.R:97:3): prob predictions ────────────────────────────
  Error in `predict(xy_fit, glass_te, type = "prob")`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, glass_te, type = "prob") test-linear-lda.R:97:2
  ── Error (test-linear-sparsediscrim.R:11:3): lda_diag fit and prediction ───────
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_diag(...) test-linear-sparsediscrim.R:11:2
   2. └─sparsediscrim:::lda_diag.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-linear-sparsediscrim.R:56:3): lda_shrink_mean fit and prediction ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_shrink_mean(...) test-linear-sparsediscrim.R:56:2
   2. └─sparsediscrim:::lda_shrink_mean.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-linear-sparsediscrim.R:100:3): lda_shrink_cov fit and prediction ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_shrink_cov(...) test-linear-sparsediscrim.R:100:2
   2. └─sparsediscrim:::lda_shrink_cov.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-linear-sparsediscrim.R:148:3): lda_emp_bayes_eigen fit and prediction ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::lda_emp_bayes_eigen(...) test-linear-sparsediscrim.R:148:2
   2. └─sparsediscrim:::lda_emp_bayes_eigen.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Failure (test-quad-qda.R:36:3): model object ────────────────────────────────
  `xy_fit <- fit_xy(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-quad-qda.R:36:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)
   7. └─parsnip::fit_xy.model_spec(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Failure (test-quad-qda.R:67:3): class predictions ───────────────────────────
  `xy_fit <- fit_xy(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-quad-qda.R:67:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)
   7. └─parsnip::fit_xy.model_spec(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-quad-qda.R:71:3): class predictions ─────────────────────────────
  Error in `predict(xy_fit, penguin_te)`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, penguin_te) test-quad-qda.R:71:2
  ── Failure (test-quad-qda.R:103:3): prob predictions ───────────────────────────
  `xy_fit <- fit_xy(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-quad-qda.R:103:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)
   7. └─parsnip::fit_xy.model_spec(qda_spec, x = penguin_tr[, -1], y = penguin_tr$species)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-quad-qda.R:107:3): prob predictions ─────────────────────────────
  Error in `predict(xy_fit, penguin_te, type = "prob")`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, penguin_te, type = "prob") test-quad-qda.R:107:2
  ── Error (test-quad-sparsediscrim.R:11:3): qda_diag fit and prediction ─────────
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::qda_diag(...) test-quad-sparsediscrim.R:11:2
   2. └─sparsediscrim:::qda_diag.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-quad-sparsediscrim.R:56:3): qda_shrink_mean fit and prediction ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::qda_shrink_mean(...) test-quad-sparsediscrim.R:56:2
   2. └─sparsediscrim:::qda_shrink_mean.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Error (test-quad-sparsediscrim.R:100:3): qda_shrink_cov fit and prediction ──
  Error: 'x' should be a matrix or data frame.
  Backtrace:
      █
   1. ├─sparsediscrim::qda_shrink_cov(...) test-quad-sparsediscrim.R:100:2
   2. └─sparsediscrim:::qda_shrink_cov.default(...)
   3.   └─sparsediscrim:::pred_to_matrix(x)
  ── Failure (test-rda.R:27:3): model object ─────────────────────────────────────
  `xy_fit <- fit_xy(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-rda.R:27:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-rda.R:31:3): model object ───────────────────────────────────────
  Error in `eval_bare(expr, quo_get_env(quo))`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─testthat::expect_equal(xy_fit$fit$covpooled, exp_f_fit$covpooled) test-rda.R:31:2
   2.   └─testthat::quasi_label(enquo(object), label, arg = "object")
   3.     └─rlang::eval_bare(expr, quo_get_env(quo))
  ── Failure (test-rda.R:50:3): class predictions ────────────────────────────────
  `xy_fit <- fit_xy(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-rda.R:50:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-rda.R:54:3): class predictions ──────────────────────────────────
  Error in `predict(xy_fit, glass_te)`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, glass_te) test-rda.R:54:2
  ── Failure (test-rda.R:78:3): prob predictions ─────────────────────────────────
  `xy_fit <- fit_xy(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)` threw an error.
  Message: `x` cannot be a vector.
  Class:   rlang_error/error/condition
  Backtrace:
      █
   1. ├─testthat::expect_error(...) test-rda.R:78:2
   2. │ └─testthat:::quasi_capture(...)
   3. │   ├─testthat:::.capture(...)
   4. │   │ └─base::withCallingHandlers(...)
   5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   6. ├─generics::fit_xy(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   7. └─parsnip::fit_xy.model_spec(rda_spec, x = glass_tr[, -10], y = glass_tr$Type)
   8.   └─parsnip:::xy_form(...)
   9.     └─parsnip::.convert_xy_to_form_fit(...)
  ── Error (test-rda.R:82:3): prob predictions ───────────────────────────────────
  Error in `predict(xy_fit, glass_te, type = "prob")`: object 'xy_fit' not found
  Backtrace:
      █
   1. └─stats::predict(xy_fit, glass_te, type = "prob") test-rda.R:82:2
  
  [ FAIL 35 | WARN 0 | SKIP 0 | PASS 619 ]
  Error: Test failures
  Execution halted