Running ‘testthat.R’ [16s/24s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > test_check("EventDetectR")
  Loading required package: EventDetectR
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (2)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-detectionQuality.R:7:19): confusionMatrix works ─────────────────
  Error: invalid value 0 for 'digits' argument
  Backtrace:
      █
   1. └─EventDetectR::detectEvents(...) test-detectionQuality.R:7:18
   2.   ├─stats::predict(edModel, newData)
   3.   └─EventDetectR:::predict.UnivariateForecast(edModel, newData)
   4.     ├─base::as.data.frame(forecast(object$modelList[[i]], h = dataLength))
   5.     └─forecast:::as.data.frame.forecast(...)
   6.       ├─base::format(tx, nsmall = nd, digits = nd)
   7.       └─base::format.default(tx, nsmall = nd, digits = nd)
   8.         └─base::prettyNum(...)
  ── Failure (test-eventClassification.R:9:15): wrongInputs lead to errors ───────
  `predict(m, newDataReal[, -1])` threw an error with unexpected message.
  Expected match: "Predictions dimensions do not match newData"
  Actual message: "invalid value 0 for 'digits' argument"
  Backtrace:
       █
    1. ├─testthat::expect_error(predict(m, newDataReal[, -1]), regexp = "Predictions dimensions do not match newData") test-eventClassification.R:9:14
    2. │ └─testthat:::quasi_capture(...)
    3. │   ├─testthat:::.capture(...)
    4. │   │ └─base::withCallingHandlers(...)
    5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    6. ├─stats::predict(m, newDataReal[, -1])
    7. └─EventDetectR:::predict.UnivariateForecast(m, newDataReal[, -1])
    8.   ├─base::as.data.frame(forecast(object$modelList[[i]], h = dataLength))
    9.   └─forecast:::as.data.frame.forecast(...)
   10.     ├─base::format(tx, nsmall = nd, digits = nd)
   11.     └─base::format.default(tx, nsmall = nd, digits = nd)
   12.       └─base::prettyNum(...)
  ── Error (test-eventClassification.R:18:15): prediction works correct ──────────
  Error: invalid value 0 for 'digits' argument
  Backtrace:
      █
   1. ├─stats::predict(m) test-eventClassification.R:18:14
   2. └─EventDetectR:::predict.UnivariateForecast(m)
   3.   ├─base::as.data.frame(forecast(object$modelList[[i]], h = dataLength))
   4.   └─forecast:::as.data.frame.forecast(...)
   5.     ├─base::format(tx, nsmall = nd, digits = nd)
   6.     └─base::format.default(tx, nsmall = nd, digits = nd)
   7.       └─base::prettyNum(...)
  ── Error (test-eventClassification.R:49:15): print works ───────────────────────
  Error: invalid value 0 for 'digits' argument
  Backtrace:
      █
   1. └─EventDetectR::detectEvents(...) test-eventClassification.R:49:14
   2.   ├─stats::predict(edModel, newData)
   3.   └─EventDetectR:::predict.UnivariateForecast(edModel, newData)
   4.     ├─base::as.data.frame(forecast(object$modelList[[i]], h = dataLength))
   5.     └─forecast:::as.data.frame.forecast(...)
   6.       ├─base::format(tx, nsmall = nd, digits = nd)
   7.       └─base::format.default(tx, nsmall = nd, digits = nd)
   8.         └─base::prettyNum(...)
  ── Error (test-plots.R:5:15): check plots ──────────────────────────────────────
  Error: invalid value 0 for 'digits' argument
  Backtrace:
      █
   1. └─EventDetectR::detectEvents(...) test-plots.R:5:14
   2.   ├─stats::predict(edModel, newData)
   3.   └─EventDetectR:::predict.UnivariateForecast(edModel, newData)
   4.     ├─base::as.data.frame(forecast(object$modelList[[i]], h = dataLength))
   5.     └─forecast:::as.data.frame.forecast(...)
   6.       ├─base::format(tx, nsmall = nd, digits = nd)
   7.       └─base::format.default(tx, nsmall = nd, digits = nd)
   8.         └─base::prettyNum(...)
  
  [ FAIL 5 | WARN 3 | SKIP 2 | PASS 8 ]
  Error: Test failures
  Execution halted