- using R Under development (unstable) (2025-04-01 r88092)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
clang version 20.1.0
flang version 20.1.0
- running under: Fedora Linux 40 (Workstation Edition)
- using session charset: UTF-8
- using option ‘--no-stop-on-test-error’
- checking for file ‘caretForecast/DESCRIPTION’ ... OK
- this is package ‘caretForecast’ version ‘0.1.1’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘caretForecast’ can be installed ... [18s/19s] OK
See the install log for details.
- checking installed package size ... OK
- checking package directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... OK
- checking whether the package can be loaded with stated dependencies ... OK
- checking whether the package can be unloaded cleanly ... OK
- checking whether the namespace can be loaded with stated dependencies ... OK
- checking whether the namespace can be unloaded cleanly ... OK
- checking loading without being on the library search path ... OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [18s/19s] OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking examples ... ERROR
Running examples in ‘caretForecast-Ex.R’ failed
The error most likely occurred in:
> ### Name: ARml
> ### Title: Autoregressive forecasting using various Machine Learning
> ### models.
> ### Aliases: ARml
>
> ### ** Examples
>
>
> library(caretForecast)
>
> train_data <- window(AirPassengers, end = c(1959, 12))
>
> test <- window(AirPassengers, start = c(1960, 1))
>
> ARml(train_data, caret_method = "lm", max_lag = 12) -> fit
initial_window = NULL. Setting initial_window = 112
Loading required package: ggplot2
Loading required package: lattice
+ Training112: intercept=TRUE
- Training112: intercept=TRUE
+ Training113: intercept=TRUE
- Training113: intercept=TRUE
+ Training114: intercept=TRUE
- Training114: intercept=TRUE
+ Training115: intercept=TRUE
- Training115: intercept=TRUE
+ Training116: intercept=TRUE
- Training116: intercept=TRUE
Aggregating results
Fitting final model on full training set
>
> forecast(fit, h = length(test)) -> fc
>
> autoplot(fc) + autolayer(test)
Error in `geom_forecast()`:
! Problem while converting geom to grob.
ℹ Error occurred in the 2nd layer.
Caused by error in `structure()`:
! attempt to set an attribute on NULL
Backtrace:
▆
1. ├─base (local) `<fn>`(x)
2. ├─ggplot2:::print.ggplot(x)
3. │ ├─ggplot2::ggplot_gtable(data)
4. │ └─ggplot2:::ggplot_gtable.ggplot_built(data)
5. │ └─ggplot2:::by_layer(...)
6. │ ├─rlang::try_fetch(...)
7. │ │ ├─base::tryCatch(...)
8. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
9. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
10. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
11. │ │ └─base::withCallingHandlers(...)
12. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
13. │ └─l$draw_geom(d, layout)
14. │ └─ggplot2 (local) draw_geom(..., self = self)
15. │ └─self$geom$draw_layer(...)
16. │ └─ggplot2 (local) draw_layer(..., self = self)
17. │ └─base::lapply(...)
18. │ └─ggplot2 (local) FUN(X[[i]], ...)
19. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params))
20. │ └─self$draw_panel(data, panel_params, coord)
21. │ └─ggplot2 (local) draw_panel(..., self = self)
22. │ └─base::lapply(...)
23. │ └─ggplot2 (local) FUN(X[[i]], ...)
24. │ └─self$draw_group(group, panel_params, coord, ...)
25. │ └─forecast (local) draw_group(...)
26. │ ├─ggplot2:::ggname(...)
27. │ │ └─grid::grobName(grob, prefix)
28. │ ├─grid::addGrob(...)
29. │ └─GeomForecastPoint$draw_panel(data[[1]], panel_scales, coord)
30. │ └─ggplot2 (local) draw_panel(..., self = self)
31. │ └─base::lapply(...)
32. │ └─ggplot2 (local) FUN(X[[i]], ...)
33. │ └─self$draw_group(group, panel_params, coord, ...)
34. │ └─forecast (local) draw_group(...)
35. │ └─forecast:::blendHex(data$colour[1], "gray30", 1)
36. │ ├─base::suppressWarnings(...)
37. │ │ └─base::withCallingHandlers(...)
38. │ ├─methods::coerce(...)
39. │ │ └─methods::as(from, class(to), strict = strict)
40. │ │ └─methods:::.identC(thisClass, Class)
41. │ └─base::structure(NULL, class = "HLS")
42. │ └─base::stop("attempt to set an attribute on NULL")
43. └─base::.handleSimpleError(...)
44. └─rlang (local) h(simpleError(msg, call))
45. └─handlers[[1L]](cnd)
46. └─cli::cli_abort(...)
47. └─rlang::abort(...)
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... OK
Running ‘testthat.R’
- checking PDF version of manual ... OK
- checking HTML version of manual ... OK
- checking for non-standard things in the check directory ... OK
- checking for detritus in the temp directory ... OK
- DONE
Status: 1 ERROR