Running ‘testthat.R’ [10s/27s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > 
  > library(testthat)
  > 
  > test_check("skpr")
  Loading required package: skpr
  Loading required package: shiny
  [ FAIL 4 | WARN 0 | SKIP 1 | PASS 338 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (testExampleCode.R:197:3): eval_design example code runs without errors ──
  Error in `n - 1`: non-numeric argument to binary operator
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at testExampleCode.R:197:2
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─skpr::gen_design(...) at testExampleCode.R:197:17
   10.   ├─base::suppressWarnings(...)
   11.   │ └─base::withCallingHandlers(...)
   12.   ├─stats::model.matrix(model, candidatesetnormalized, contrasts.arg = contrastslist)
   13.   └─stats::model.matrix.default(model, candidatesetnormalized, contrasts.arg = contrastslist)
   14.     └─stats::`contrasts<-`(`*tmp*`, value = contrasts.arg[[nn]])
   15.       └─skpr (local) value(levels(x))
   16.         └─base::matrix(nrow = n - 1, ncol = n)
  ── Error (testExampleCode.R:241:3): eval_design_mc example code runs without errors ──
  Error in `n - 1`: non-numeric argument to binary operator
  Backtrace:
       ▆
    1. ├─testthat::expect_silent(...) at testExampleCode.R:241:2
    2. │ └─testthat:::quasi_capture(enquo(object), NULL, evaluate_promise)
    3. │   ├─testthat (local) .capture(...)
    4. │   │ ├─withr::with_output_sink(...)
    5. │   │ │ └─base::force(code)
    6. │   │ ├─base::withCallingHandlers(...)
    7. │   │ └─base::withVisible(code)
    8. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    9. └─skpr::gen_design(...) at testExampleCode.R:242:4
   10.   ├─base::suppressWarnings(...)
   11.   │ └─base::withCallingHandlers(...)
   12.   ├─stats::model.matrix(model, candidatesetnormalized, contrasts.arg = contrastslist)
   13.   └─stats::model.matrix.default(model, candidatesetnormalized, contrasts.arg = contrastslist)
   14.     └─stats::`contrasts<-`(`*tmp*`, value = contrasts.arg[[nn]])
   15.       └─skpr (local) value(levels(x))
   16.         └─base::matrix(nrow = n - 1, ncol = n)
  ── Error (testPlottingFunctions.R:12:3): plot_correlations works as intended ───
  Error in `n - 1`: non-numeric argument to binary operator
  Backtrace:
      ▆
   1. └─skpr::gen_design(candlist, ~., 23) at testPlottingFunctions.R:12:2
   2.   ├─base::suppressWarnings(...)
   3.   │ └─base::withCallingHandlers(...)
   4.   ├─stats::model.matrix(model, candidatesetnormalized, contrasts.arg = contrastslist)
   5.   └─stats::model.matrix.default(model, candidatesetnormalized, contrasts.arg = contrastslist)
   6.     └─stats::`contrasts<-`(`*tmp*`, value = contrasts.arg[[nn]])
   7.       └─skpr (local) value(levels(x))
   8.         └─base::matrix(nrow = n - 1, ncol = n)
  ── Error (testPlottingFunctions.R:33:3): plot_fds works as intended ────────────
  Error in `n - 1`: non-numeric argument to binary operator
  Backtrace:
      ▆
   1. └─skpr::gen_design(candlist, ~., 23) at testPlottingFunctions.R:33:2
   2.   ├─base::suppressWarnings(...)
   3.   │ └─base::withCallingHandlers(...)
   4.   ├─stats::model.matrix(model, candidatesetnormalized, contrasts.arg = contrastslist)
   5.   └─stats::model.matrix.default(model, candidatesetnormalized, contrasts.arg = contrastslist)
   6.     └─stats::`contrasts<-`(`*tmp*`, value = contrasts.arg[[nn]])
   7.       └─skpr (local) value(levels(x))
   8.         └─base::matrix(nrow = n - 1, ncol = n)
  
  [ FAIL 4 | WARN 0 | SKIP 1 | PASS 338 ]
  Error: Test failures
  Execution halted