Running ‘testthat.R’ [51s/72s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > # Machine Learning
  > library(tidymodels)
  ── Attaching packages ────────────────────────────────────── tidymodels 0.1.4 ──
  ✔ broom        0.7.10     ✔ recipes      0.1.17
  ✔ dials        0.0.10     ✔ rsample      0.1.1 
  ✔ dplyr        1.0.7      ✔ tibble       3.1.6 
  ✔ ggplot2      3.3.5      ✔ tidyr        1.1.4 
  ✔ infer        1.0.0      ✔ tune         0.1.6 
  ✔ modeldata    0.1.1      ✔ workflows    0.2.4 
  ✔ parsnip      0.1.7      ✔ workflowsets 0.1.0 
  ✔ purrr        0.3.4      ✔ yardstick    0.0.9 
  ── Conflicts ───────────────────────────────────────── tidymodels_conflicts() ──
  ✖ purrr::discard() masks scales::discard()
  ✖ dplyr::filter()  masks stats::filter()
  ✖ purrr::is_null() masks testthat::is_null()
  ✖ dplyr::lag()     masks stats::lag()
  ✖ tidyr::matches() masks rsample::matches(), dplyr::matches(), testthat::matches()
  ✖ recipes::step()  masks stats::step()
  • Use suppressPackageStartupMessages() to eliminate package startup messages
  > library(modeltime)
  > library(modeltime.ensemble)
  Loading required package: modeltime.resample
  > library(modeltime.resample)
  > 
  > # Model dependencies
  > library(xgboost)
  
  Attaching package: 'xgboost'
  
  The following object is masked from 'package:dplyr':
  
      slice
  
  > library(earth)
  Loading required package: Formula
  Loading required package: plotmo
  Loading required package: plotrix
  
  Attaching package: 'plotrix'
  
  The following object is masked from 'package:scales':
  
      rescale
  
  Loading required package: TeachingDemos
  > library(glmnet)
  Loading required package: Matrix
  
  Attaching package: 'Matrix'
  
  The following objects are masked from 'package:tidyr':
  
      expand, pack, unpack
  
  Loaded glmnet 4.1-3
  > 
  > # Core Packages
  > library(tidyverse)
  ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
  ✔ readr   2.1.1     ✔ forcats 0.5.1
  ✔ stringr 1.4.0     
  ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
  ✖ readr::col_factor()    masks scales::col_factor()
  ✖ purrr::discard()       masks scales::discard()
  ✖ readr::edition_get()   masks testthat::edition_get()
  ✖ Matrix::expand()       masks tidyr::expand()
  ✖ dplyr::filter()        masks stats::filter()
  ✖ stringr::fixed()       masks recipes::fixed()
  ✖ purrr::is_null()       masks testthat::is_null()
  ✖ dplyr::lag()           masks stats::lag()
  ✖ readr::local_edition() masks testthat::local_edition()
  ✖ tidyr::matches()       masks rsample::matches(), dplyr::matches(), testthat::matches()
  ✖ Matrix::pack()         masks tidyr::pack()
  ✖ xgboost::slice()       masks dplyr::slice()
  ✖ readr::spec()          masks yardstick::spec()
  ✖ Matrix::unpack()       masks tidyr::unpack()
  > library(timetk)
  > library(lubridate)
  
  Attaching package: 'lubridate'
  
  The following objects are masked from 'package:base':
  
      date, intersect, setdiff, union
  
  > 
  > test_check("modeltime.ensemble")
  ── Modeltime Ensemble ───────────────────────────────────────────
  Ensemble of 3 Models (WEIGHTED)
  
  # Modeltime Table
  # A tibble: 3 × 4
    .model_id .model     .model_desc             .loadings
        <int> <list>     <chr>                       <dbl>
  1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12]     0.5  
  2         2 <workflow> PROPHET                     0.333
  3         3 <workflow> GLMNET                      0.167
  # Modeltime Table
  # A tibble: 2 × 3
    .model_id .model .model_desc
        <int> <list> <chr>      
  1         2 <NULL> PROPHET    
  2         3 <NULL> GLMNET     
  
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (4)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-ensemble_average.R:26:1): (code run outside of `test_that()`) ───
  Error in `setup_dataframe(m, history, initialize_scales = TRUE)`: 'list' object cannot be coerced to type 'double'
  Backtrace:
       █
    1. ├─`%>%`(...) test-ensemble_average.R:26:0
    2. ├─generics::fit(., training(m750_splits))
    3. ├─workflows:::fit.workflow(., training(m750_splits))
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. └─modeltime::prophet_fit_impl(x = maybe_data_frame(x), y = y, uncertainty.samples = 0)
   15.   └─prophet::fit.prophet(m, df)
   16.     └─prophet:::setup_dataframe(m, history, initialize_scales = TRUE)
  ── Error (test-nested-ensembles.R:79:5): Nested Ensembles Work - sequential ────
  <dplyr_error/rlang_error/error/condition>
  Error: arrange() failed at implicit mutate() step. 
  * Problem with `mutate()` column `..1`.
  ℹ `..1 = id`.
  ✖ `..1` must be a vector, not a function.
  Backtrace:
       █
    1. ├─`%>%`(...) test-nested-ensembles.R:79:4
    2. ├─modeltime.ensemble::ensemble_nested_average(...)
    3. ├─modeltime.ensemble:::ensemble_nested_average.nested_mdl_time(...)
    4. │ └─modeltime.ensemble:::ensemble_nested_average_sequential(...)
    5. │   └─`%>%`(...)
    6. ├─dplyr::arrange(., !!as.name(id_text), .key, .model_id)
    7. ├─dplyr:::arrange.data.frame(., !!as.name(id_text), .key, .model_id)
    8. │ └─dplyr:::arrange_rows(.data, dots)
    9. │   ├─base::withCallingHandlers(...)
   10. │   ├─dplyr::transmute(new_data_frame(.data), !!!quosures)
   11. │   └─dplyr:::transmute.data.frame(new_data_frame(.data), !!!quosures)
   12. │     ├─dplyr::mutate(.data, !!!dots, .keep = "none")
   13. │     └─dplyr:::mutate.data.frame(.data, !!!dots, .keep = "none")
   14. │       └─dplyr:::mutate_cols(.data, ..., caller_env = caller_env())
   15. │         ├─base::withCallingHandlers(...)
   16. │         └─mask$eval_all_mutate(quo)
   17. ├─dplyr:::abort_glue(...)
   18. │ ├─rlang::exec(abort, class = class, !!!data)
   19. │ └─(function (message = NULL, class = NULL, ..., trace = NULL, parent = NULL, ...
   20. │   └─rlang:::signal_abort(cnd)
   21. │     └─base::signalCondition(cnd)
   22. ├─(function (e) ...
   23. │ └─rlang::abort(...)
   24. │   └─rlang:::signal_abort(cnd)
   25. │     └─base::signalCondition(cnd)
   26. └─(function (cnd) ...
  ── Error (test-panel-data.R:16:1): (code run outside of `test_that()`) ─────────
  Error in `setup_dataframe(m, history, initialize_scales = TRUE)`: 'list' object cannot be coerced to type 'double'
  Backtrace:
       █
    1. ├─`%>%`(...) test-panel-data.R:16:0
    2. ├─generics::fit(., data_set)
    3. ├─workflows:::fit.workflow(., data_set)
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. └─modeltime::prophet_xgboost_fit_impl(...)
   15.   └─prophet::prophet(...)
   16.     └─prophet::fit.prophet(m, df, ...)
   17.       └─prophet:::setup_dataframe(m, history, initialize_scales = TRUE)
  ── Error (test-recursive.R:142:5): recursive ensemble 2 - panel / function / parsnip + workflow ──
  Error in `storage.mode(y) <- "double"`: 'list' object cannot be coerced to type 'double'
  Backtrace:
       █
    1. ├─`%>%`(...) test-recursive.R:142:4
    2. ├─generics::fit(., train_data)
    3. ├─workflows:::fit.workflow(., train_data)
    4. │ └─workflows::.fit_model(workflow, control)
    5. │   ├─generics::fit(action_model, workflow = workflow, control = control)
    6. │   └─workflows:::fit.action_model(...)
    7. │     └─workflows:::fit_from_xy(spec, mold, control_parsnip)
    8. │       ├─generics::fit_xy(...)
    9. │       └─parsnip::fit_xy.model_spec(...)
   10. │         └─parsnip:::xy_xy(...)
   11. │           ├─base::system.time(...)
   12. │           └─parsnip:::eval_mod(...)
   13. │             └─rlang::eval_tidy(e, ...)
   14. └─glmnet::glmnet(x = maybe_matrix(x), y = y, family = "gaussian")
   15.   └─glmnet:::elnet(...)
  
  [ FAIL 4 | WARN 31 | SKIP 4 | PASS 33 ]
  Error: Test failures
  Execution halted