Running ‘testthat.R’ [203s/203s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > # Machine Learning
  > library(tidymodels)
  ── Attaching packages ────────────────────────────────────── tidymodels 0.1.3 ──
  ✔ broom        0.7.6      ✔ recipes      0.1.16
  ✔ dials        0.0.9      ✔ rsample      0.1.0 
  ✔ dplyr        1.0.6      ✔ tibble       3.1.2 
  ✔ ggplot2      3.3.3      ✔ tidyr        1.1.3 
  ✔ infer        0.5.4      ✔ tune         0.1.5 
  ✔ modeldata    0.1.0      ✔ workflows    0.2.2 
  ✔ parsnip      0.1.6      ✔ workflowsets 0.0.2 
  ✔ purrr        0.3.4      ✔ yardstick    0.0.8 
  ── 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 tidymodels_prefer() to resolve common conflicts.
  > library(modeltime)
  
  Attaching package: 'modeltime'
  
  The following object is masked from 'package:tune':
  
      val_class_and_single
  
  > 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-1
  > 
  > # Core Packages
  > library(tidyverse)
  ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
  ✔ readr   1.4.0     ✔ forcats 0.5.1
  ✔ stringr 1.4.0     
  ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
  ✖ readr::col_factor() masks scales::col_factor()
  ✖ purrr::discard()    masks scales::discard()
  ✖ 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()
  ✖ 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 (MEDIAN)
  
  # Modeltime Table
  # A tibble: 3 x 3
    .model_id .model     .model_desc            
        <int> <list>     <chr>                  
  1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
  2         2 <workflow> PROPHET                
  3         3 <workflow> GLMNET                 
  ── Fitting Non-Tunable Model Specification ──────────────────────
  
  # A tibble: 4 x 3
    .model_id  rmse .model_desc            
    <chr>     <dbl> <chr>                  
  1 1          579. ARIMA(0,1,1)(0,1,1)[12]
  2 2          381. PROPHET                
  3 3          558. GLMNET                 
  4 ensemble   128. ENSEMBLE (MODEL SPEC)  
  
  ── Final Model ──────────────────────────────────────────────────
  
  ══ Workflow [trained] ══════════════════════════════════════════════════════════
  Preprocessor: Recipe
  Model: linear_reg()
  
  ── Preprocessor ────────────────────────────────────────────────────────────────
  0 Recipe Steps
  
  ── Model ───────────────────────────────────────────────────────────────────────
  
  Call:
  stats::lm(formula = ..y ~ ., data = data)
  
  Coefficients:
  (Intercept)  .model_id_1  .model_id_2  .model_id_3  
   -2637.2266       0.5754      -0.1919       0.8550  
  
  
  1.193 sec elapsed
  
  ── Modeltime Ensemble ───────────────────────────────────────────
  Ensemble of 3 Models (LM STACK)
  
  # Modeltime Table
  # A tibble: 3 x 3
    .model_id .model     .model_desc            
        <int> <list>     <chr>                  
  1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
  2         2 <workflow> PROPHET                
  3         3 <workflow> GLMNET                 
  ── Modeltime Ensemble ───────────────────────────────────────────
  Ensemble of 3 Models (GLMNET STACK)
  
  # Modeltime Table
  # A tibble: 3 x 3
    .model_id .model     .model_desc            
        <int> <list>     <chr>                  
  1         1 <workflow> ARIMA(0,1,1)(0,1,1)[12]
  2         2 <workflow> PROPHET                
  3         3 <workflow> GLMNET                 
  ── Modeltime Ensemble ───────────────────────────────────────────
  Ensemble of 3 Models (WEIGHTED)
  
  # Modeltime Table
  # A tibble: 3 x 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
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-ensemble_model_spec.R:107:5): ensemble_model_spec(): Linear Regression (No Tuning) ──
  Error: missing value where TRUE/FALSE needed
  Backtrace:
      █
   1. ├─`%>%`(...) test-ensemble_model_spec.R:107:4
   2. ├─modeltime::modeltime_refit(...)
   3. └─modeltime:::modeltime_refit.mdl_time_tbl(...)
  
  [ FAIL 1 | WARN 132 | SKIP 0 | PASS 140 ]
  Error: Test failures
  Execution halted