Running ‘testthat.R’ [56s/62s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(anomalize)
  ══ Use anomalize to improve your Forecasts by 50%! ═════════════════════════════
  Business Science offers a 1-hour course - Lab #18: Time Series Anomaly Detection!
  </> Learn more at: https://university.business-science.io/p/learning-labs-pro </>
  > library(dplyr)
  
  Attaching package: 'dplyr'
  
  The following object is masked from 'package:testthat':
  
      matches
  
  The following objects are masked from 'package:stats':
  
      filter, lag
  
  The following objects are masked from 'package:base':
  
      intersect, setdiff, setequal, union
  
  > library(ggplot2)
  > library(tibble)
  > library(stringr)
  > 
  > # set_time_scale_template(time_scale_template())
  > 
  > test_check("anomalize")
  ── 1. Error: returns a ggplot (@test-plot_anomalies.R#8)  ──────────────────────
  invalid 'type' (character) of argument
  Backtrace:
    1. anomalize::time_decompose(., count, method = "stl")
    1. anomalize::anomalize(., remainder, method = "iqr")
    8. anomalize::time_recompose(.)
    4. dplyr::ungroup(.)
    4. dplyr::select(., observed:remainder, contains("_l1"))
    4. dplyr::select(., -c(observed, remainder))
   12. base::apply(., MARGIN = 1, FUN = sum)
  
  ── 2. Error: returns a ggplot (@test-plot_anomaly_decomposition.R#10)  ─────────
  Object cannot be grouped. Select a single time series for evaluation, and use `dplyr::ungroup()`.
  Backtrace:
   1. dplyr::filter(., package == "tidyquant")
   1. dplyr::ungroup(.)
   1. anomalize::time_decompose(., count, method = "stl")
   1. anomalize::anomalize(., remainder, method = "iqr")
   9. anomalize::plot_anomaly_decomposition(.)
  
  ── 3. Error: grouped_tbl_time works (@test-time_apply.R#11)  ───────────────────
  Problem with `mutate()` input `nested.col`.
  ✖ Problem with `mutate()` input `date`.
  ✖ Input `date` can't be recycled to size 7.
  ℹ Input `date` is `data %>% dplyr::pull(date)`.
  ℹ Input `date` must be size 7 or 1, not 425.
  ℹ The error occured in group 1: date = 2017-01-07.
  ℹ Input `nested.col` is `purrr::map(.x = data, .f = .f, target = count, ...)`.
  ℹ The error occured in group 1: package = "broom".
  Backtrace:
    9. anomalize::time_apply(...)
   10. anomalize:::grouped_mapper(...)
    3. tidyr::nest(.)
   10. dplyr::mutate(...)
   29. dplyr:::mutate_cols(.data, ...)
  
  ── 4. Error: tbl_time works (@test-time_apply.R#17)  ───────────────────────────
  Problem with `mutate()` input `nested.col`.
  ✖ Problem with `mutate()` input `date`.
  ✖ Input `date` can't be recycled to size 7.
  ℹ Input `date` is `data %>% dplyr::pull(date)`.
  ℹ Input `date` must be size 7 or 1, not 425.
  ℹ The error occured in group 1: date = 2017-01-07.
  ℹ Input `nested.col` is `purrr::map(.x = data, .f = .f, target = count, ...)`.
  ℹ The error occured in group 1: package = "tidyquant".
  Backtrace:
    1. dplyr::filter(., package == "tidyquant")
    1. dplyr::ungroup(.)
    9. anomalize::time_apply(...)
   12. anomalize:::grouped_mapper(...)
    5. tidyr::nest(.)
   12. dplyr::mutate(...)
   29. dplyr:::mutate_cols(.data, ...)
  
  ── 5. Failure: single tbl_df (@test-time_decompose.R#20)  ──────────────────────
  ncol(stl_tbl_time) not equal to 5.
  1/1 mismatches
  [1] 6 - 5 == 1
  
  ── 6. Error: time_frequency works: period = 'auto' (@test-time_frequency.R#26)  
  Cannot use on a grouped data frame.
  Frequency should be performed on a single time series.
  Backtrace:
   9. anomalize::time_frequency(.)
  
  ── 7. Error: time_frequency works: period = '1 month' (@test-time_frequency.R#35
  Cannot use on a grouped data frame.
  Frequency should be performed on a single time series.
  Backtrace:
   9. anomalize::time_frequency(., period = "1 month")
  
  ── 8. Error: time_frequency works: period = 5 (@test-time_frequency.R#44)  ─────
  Cannot use on a grouped data frame.
  Frequency should be performed on a single time series.
  Backtrace:
   9. anomalize::time_frequency(., period = 5)
  
  ── 9. Error: time_trend works: period = 'auto' (@test-time_frequency.R#55)  ────
  Cannot use on a grouped data frame.
  Frequency should be performed on a single time series.
  Backtrace:
   9. anomalize::time_trend(.)
  
  ── 10. Error: time_trend works: period = '90 days' (@test-time_frequency.R#64)  
  Cannot use on a grouped data frame.
  Frequency should be performed on a single time series.
  Backtrace:
   9. anomalize::time_trend(., period = "30 days")
  
  ── 11. Error: time_trend works: period = 90 (@test-time_frequency.R#73)  ───────
  Cannot use on a grouped data frame.
  Frequency should be performed on a single time series.
  Backtrace:
   9. anomalize::time_trend(., period = 90)
  
  ── 12. Error: time_trend works with small data: period = 'auto' (@test-time_freq
  Cannot use on a grouped data frame.
  Frequency should be performed on a single time series.
  Backtrace:
   9. anomalize::time_trend(.)
  
  ── 13. Error: time_recompose works on grouped_tbl_time (@test-time_recompose.R#9
  invalid 'type' (character) of argument
  Backtrace:
    1. anomalize::time_decompose(., count, method = "stl")
    1. anomalize::anomalize(., remainder, method = "iqr")
    9. anomalize::time_recompose(.)
    4. dplyr::ungroup(.)
    4. dplyr::select(., observed:remainder, contains("_l1"))
    4. dplyr::select(., -c(observed, remainder))
   12. base::apply(., MARGIN = 1, FUN = sum)
  
  ── 14. Error: time_recompose works on tbl_time (@test-time_recompose.R#17)  ────
  invalid 'type' (character) of argument
  Backtrace:
    1. dplyr::filter(., package == "tidyquant")
    1. dplyr::ungroup(.)
    1. anomalize::time_decompose(., count, method = "stl")
    1. anomalize::anomalize(., remainder, method = "iqr")
    9. anomalize::time_recompose(.)
    6. dplyr::ungroup(.)
    6. dplyr::select(., observed:remainder, contains("_l1"))
    6. dplyr::select(., -c(observed, remainder))
   14. base::apply(., MARGIN = 1, FUN = sum)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 53 | SKIPPED: 0 | WARNINGS: 0 | FAILED: 14 ]
  1. Error: returns a ggplot (@test-plot_anomalies.R#8) 
  2. Error: returns a ggplot (@test-plot_anomaly_decomposition.R#10) 
  3. Error: grouped_tbl_time works (@test-time_apply.R#11) 
  4. Error: tbl_time works (@test-time_apply.R#17) 
  5. Failure: single tbl_df (@test-time_decompose.R#20) 
  6. Error: time_frequency works: period = 'auto' (@test-time_frequency.R#26) 
  7. Error: time_frequency works: period = '1 month' (@test-time_frequency.R#35) 
  8. Error: time_frequency works: period = 5 (@test-time_frequency.R#44) 
  9. Error: time_trend works: period = 'auto' (@test-time_frequency.R#55) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted