Package: conformalForecast Check: examples New result: ERROR Running examples in ‘conformalForecast-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: accuracy.default > ### Title: Accuracy measures for a cross-validation model and a conformal > ### prediction model > ### Aliases: accuracy.default > > ### ** Examples > > # Simulate time series from an AR(2) model > library(forecast) > series <- arima.sim(n = 200, list(ar = c(0.8, -0.5)), sd = sqrt(1)) > > # Cross-validation forecasting with a rolling window > far2 <- function(x, h, level) { + Arima(x, order = c(2, 0, 0)) |> + forecast(h = h, level) + } > fc <- cvforecast(series, forecastfun = far2, h = 3, level = 95, + forward = TRUE, initial = 1, window = 50) > > # Out-of-sample forecast accuracy on validation set > accuracy(fc, measures = point_measures, byhorizon = TRUE) Error in NextMethod(.Generic) : cannot assign 'tsp' to zero-length vector Calls: accuracy ... accuracy.forecast -> trainingaccuracy -> Ops.ts -> NextMethod Execution halted Package: conformalForecast Check: re-building of vignette outputs New result: ERROR Error(s) in re-building vignettes: ... --- re-building ‘conformalForecast.Rmd’ using rmarkdown Quitting from conformalForecast.Rmd:68-72 [cvinfo] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error in `NextMethod()`: ! cannot assign 'tsp' to zero-length vector --- Backtrace: ▆ 1. ├─generics::accuracy(fc, byhorizon = TRUE) 2. └─forecast:::accuracy.forecast(fc, byhorizon = TRUE) 3. └─forecast:::trainingaccuracy(object, test, d, D) 4. ├─stats:::Ops.ts(dx, fits) 5. └─base::NextMethod(.Generic) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'conformalForecast.Rmd' failed with diagnostics: cannot assign 'tsp' to zero-length vector --- failed re-building ‘conformalForecast.Rmd’ SUMMARY: processing the following file failed: ‘conformalForecast.Rmd’ Error: Vignette re-building failed. Execution halted Package: EventDetectR Check: tests New result: ERROR Running ‘testthat.R’ [33s/33s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > > test_check("EventDetectR") Loading required package: EventDetectR Saving _problems/test-eventClassification-54.R Saving _problems/test-eventClassification-58.R [1] "EDS is working on index: 500" [ FAIL 2 | WARN 3 | SKIP 2 | PASS 22 ] ══ Skipped tests (2) ═══════════════════════════════════════════════════════════ • On CRAN (2): 'test-buildModel.R:1:1', 'test-detectEvents.R:1:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-eventClassification.R:54:15'): print works ─────────────────── Expected `printRes[1]` to equal "Event Detection Object with 11 ARIMA submodels". Differences: 1/1 mismatches x[1]: "Event Detection Object with 11 fc_model submodels" y[1]: "Event Detection Object with 11 ARIMA submodels" ── Failure ('test-eventClassification.R:58:15'): print works ─────────────────── Expected `printRes[1]` to equal "Event Detection Object with 1 ARIMA submodel". Differences: 1/1 mismatches x[1]: "Event Detection Object with 1 fc_model submodel" y[1]: "Event Detection Object with 1 ARIMA submodel" [ FAIL 2 | WARN 3 | SKIP 2 | PASS 22 ] Error: ! Test failures. Execution halted Package: forecastHybrid Check: tests New result: ERROR Running ‘testthat.R’ [53s/48s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(forecastHybrid) # nolint: unused_import_linter Loading required package: forecast Loading required package: thief > library(testthat) > > test_check("forecastHybrid") Saving _problems/test-accuracy-10.R Hybrid forecast model comprised of the following models: auto.arima, ets, thetam, nnetar, tbats ############ auto.arima with weight 0.2 ############ ets with weight 0.2 ############ thetam with weight 0.2 ############ nnetar with weight 0.2 ############ tbats with weight 0.2 Hybrid forecast model comprised of the following models: auto.arima, ets, thetam, nnetar, tbats ############ auto.arima with weight 0.2 ############ ets with weight 0.2 ############ thetam with weight 0.2 ############ nnetar with weight 0.2 ############ tbats with weight 0.2 Saving _problems/test-generics-26.R Saving _problems/test-hybridModel-62.R Saving _problems/test-hybridModel-74.R Saving _problems/test-hybridModel-195.R Saving _problems/test-theta-65.R [ FAIL 6 | WARN 0 | SKIP 2 | PASS 271 ] ══ Skipped tests (2) ═══════════════════════════════════════════════════════════ • On CRAN (2): 'test-cvts.R:51:1', 'test-forecast.hybridModel.R:25:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Failure ('test-accuracy.R:10:3'): Accuracy generic function works ─────────── `accuracy(hm$thetam)` threw an error. Message: no applicable method for 'accuracy' applied to an object of class "c('thetam', 'ets')" Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(accuracy(hm$thetam), NA) at test-accuracy.R:10:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─generics::accuracy(hm$thetam) ── Failure ('test-generics.R:26:3'): Testing generics is.hybridModel(), fitted(), residuals(), and accuracy() ── `accuracy(exampleModel, individual = TRUE)` threw an error. Message: no applicable method for 'accuracy' applied to an object of class "c('thetam', 'ets')" Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-generics.R:26:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. ├─generics::accuracy(exampleModel, individual = TRUE) 7. └─forecastHybrid:::accuracy.hybridModel(exampleModel, individual = TRUE) 8. └─forecast::accuracy(object[[model]]) ── Error ('test-hybridModel.R:62:3'): Testing for warnings ───────────────────── Error in `UseMethod("accuracy")`: no applicable method for 'accuracy' applied to an object of class "c('thetam', 'ets')" Backtrace: ▆ 1. ├─testthat::expect_warning(hybridModel(ts(1:20, f = 2), weight = "insample.errors")) at test-hybridModel.R:62:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─forecastHybrid::hybridModel(ts(1:20, f = 2), weight = "insample.errors") 7. └─base::sapply(expandedModels, weightFunction) 8. └─base::lapply(X = X, FUN = FUN, ...) 9. └─forecastHybrid (local) FUN(X[[i]], ...) 10. └─generics::accuracy(modResults[[getModelName(x)]]) ── Error ('test-hybridModel.R:73:3'): Testing valid inputs ───────────────────── Error in `UseMethod("accuracy")`: no applicable method for 'accuracy' applied to an object of class "c('thetam', 'ets')" Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-hybridModel.R:73:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─forecastHybrid::hybridModel(inputSeries, models = "aensft", weights = "insample.errors") 7. └─base::sapply(expandedModels, weightFunction) 8. └─base::lapply(X = X, FUN = FUN, ...) 9. └─forecastHybrid (local) FUN(X[[i]], ...) 10. └─generics::accuracy(modResults[[getModelName(x)]]) ── Error ('test-hybridModel.R:194:7'): Testing the weighting methods ─────────── Error in `UseMethod("accuracy")`: no applicable method for 'accuracy' applied to an object of class "c('thetam', 'ets')" Backtrace: ▆ 1. ├─testthat::expect_warning(...) at test-hybridModel.R:194:7 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─forecastHybrid::hybridModel(inputSeries, models = models, weights = weight) 7. └─base::sapply(expandedModels, weightFunction) 8. └─base::lapply(X = X, FUN = FUN, ...) 9. └─forecastHybrid (local) FUN(X[[i]], ...) 10. └─generics::accuracy(modResults[[getModelName(x)]]) ── Failure ('test-theta.R:65:3'): Generic `forecast` methods work on thetam objects ── `accuracy(mod1)` threw an error. Message: no applicable method for 'accuracy' applied to an object of class "c('thetam', 'ets')" Class: simpleError/error/condition Backtrace: ▆ 1. ├─testthat::expect_error(accuracy(mod1), NA) at test-theta.R:65:3 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─generics::accuracy(mod1) [ FAIL 6 | WARN 0 | SKIP 2 | PASS 271 ] Error: ! Test failures. Execution halted