Running ‘testthat.R’ [12s/18s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(timetk)
  > 
  > test_check("timetk")
  ── 1. Error: tk_get_timeseries_signature(yearmon) test returns correct format. (
  Evaluation error: do not know how to convert 'index' to class "Date".
  1: tk_get_timeseries_signature(test_yearmon) at testthat/test_tk_get_timeseries.R:40
  2: tk_get_timeseries_signature.yearmon(test_yearmon)
  3: get_timeseries_signature_date(idx)
  4: tibble::tibble(index = idx) %>% dplyr::mutate(index.num = as.numeric(as.POSIXct(index)) %>% 
         as.integer(), diff = c(NA, diff(index.num)) %>% as.integer(), year = lubridate::year(index) %>% 
         as.integer(), year.iso = lubridate::isoyear(index) %>% as.integer(), half = lubridate::semester(index) %>% 
         as.integer(), quarter = lubridate::quarter(index) %>% as.integer(), month = lubridate::month(index) %>% 
         as.integer(), month.xts = as.integer(lubridate::month(index)) - 1L, month.lbl = lubridate::month(index, 
         label = TRUE, abbr = FALSE), day = lubridate::day(index) %>% as.integer(), hour = lubridate::hour(index) %>% 
         as.integer(), minute = lubridate::minute(index) %>% as.integer(), second = lubridate::second(index) %>% 
         as.integer(), hour12 = stringi::stri_datetime_fields(lubridate::as_datetime(index))$Hour12, 
         am.pm = stringi::stri_datetime_fields(lubridate::as_datetime(index))$AmPm, wday = lubridate::wday(index) %>% 
             as.integer(), wday.xts = as.integer(lubridate::wday(index)) - 1L, wday.lbl = lubridate::wday(index, 
             label = TRUE, abbr = FALSE), mday = lubridate::mday(index) %>% as.integer(), 
         qday = lubridate::qday(lubridate::as_date(index)) %>% as.integer(), yday = lubridate::yday(index) %>% 
             as.integer(), mweek = stringi::stri_datetime_fields(lubridate::as_date(index))$WeekOfMonth %>% 
             as.integer(), week = lubridate::week(index) %>% as.integer(), week.iso = lubridate::isoweek(index) %>% 
             as.integer(), week2 = as.integer(week%%2), week3 = as.integer(week%%3), week4 = as.integer(week%%4), 
         mday7 = as.integer(mday%/%7) + 1L)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate(., index.num = as.numeric(as.POSIXct(index)) %>% as.integer(), diff = c(NA, 
         diff(index.num)) %>% as.integer(), year = lubridate::year(index) %>% as.integer(), 
         year.iso = lubridate::isoyear(index) %>% as.integer(), half = lubridate::semester(index) %>% 
             as.integer(), quarter = lubridate::quarter(index) %>% as.integer(), month = lubridate::month(index) %>% 
             as.integer(), month.xts = as.integer(lubridate::month(index)) - 1L, month.lbl = lubridate::month(index, 
             label = TRUE, abbr = FALSE), day = lubridate::day(index) %>% as.integer(), 
         hour = lubridate::hour(index) %>% as.integer(), minute = lubridate::minute(index) %>% 
             as.integer(), second = lubridate::second(index) %>% as.integer(), hour12 = stringi::stri_datetime_fields(lubridate::as_datetime(index))$Hour12, 
         am.pm = stringi::stri_datetime_fields(lubridate::as_datetime(index))$AmPm, wday = lubridate::wday(index) %>% 
             as.integer(), wday.xts = as.integer(lubridate::wday(index)) - 1L, wday.lbl = lubridate::wday(index, 
             label = TRUE, abbr = FALSE), mday = lubridate::mday(index) %>% as.integer(), 
         qday = lubridate::qday(lubridate::as_date(index)) %>% as.integer(), yday = lubridate::yday(index) %>% 
             as.integer(), mweek = stringi::stri_datetime_fields(lubridate::as_date(index))$WeekOfMonth %>% 
             as.integer(), week = lubridate::week(index) %>% as.integer(), week.iso = lubridate::isoweek(index) %>% 
             as.integer(), week2 = as.integer(week%%2), week3 = as.integer(week%%3), week4 = as.integer(week%%4), 
         mday7 = as.integer(mday%/%7) + 1L)
  13: mutate.tbl_df(., index.num = as.numeric(as.POSIXct(index)) %>% as.integer(), diff = c(NA, 
         diff(index.num)) %>% as.integer(), year = lubridate::year(index) %>% as.integer(), 
         year.iso = lubridate::isoyear(index) %>% as.integer(), half = lubridate::semester(index) %>% 
             as.integer(), quarter = lubridate::quarter(index) %>% as.integer(), month = lubridate::month(index) %>% 
             as.integer(), month.xts = as.integer(lubridate::month(index)) - 1L, month.lbl = lubridate::month(index, 
             label = TRUE, abbr = FALSE), day = lubridate::day(index) %>% as.integer(), 
         hour = lubridate::hour(index) %>% as.integer(), minute = lubridate::minute(index) %>% 
             as.integer(), second = lubridate::second(index) %>% as.integer(), hour12 = stringi::stri_datetime_fields(lubridate::as_datetime(index))$Hour12, 
         am.pm = stringi::stri_datetime_fields(lubridate::as_datetime(index))$AmPm, wday = lubridate::wday(index) %>% 
             as.integer(), wday.xts = as.integer(lubridate::wday(index)) - 1L, wday.lbl = lubridate::wday(index, 
             label = TRUE, abbr = FALSE), mday = lubridate::mday(index) %>% as.integer(), 
         qday = lubridate::qday(lubridate::as_date(index)) %>% as.integer(), yday = lubridate::yday(index) %>% 
             as.integer(), mweek = stringi::stri_datetime_fields(lubridate::as_date(index))$WeekOfMonth %>% 
             as.integer(), week = lubridate::week(index) %>% as.integer(), week.iso = lubridate::isoweek(index) %>% 
             as.integer(), week2 = as.integer(week%%2), week3 = as.integer(week%%3), week4 = as.integer(week%%4), 
         mday7 = as.integer(mday%/%7) + 1L)
  14: mutate_impl(.data, dots)
  
  ── 2. Error: tk_get_timeseries_signature(yearqtr) test returns correct format. (
  Evaluation error: do not know how to convert 'index' to class "Date".
  1: tk_get_timeseries_signature(test_yearqtr) at testthat/test_tk_get_timeseries.R:54
  2: tk_get_timeseries_signature.yearqtr(test_yearqtr)
  3: get_timeseries_signature_date(idx)
  4: tibble::tibble(index = idx) %>% dplyr::mutate(index.num = as.numeric(as.POSIXct(index)) %>% 
         as.integer(), diff = c(NA, diff(index.num)) %>% as.integer(), year = lubridate::year(index) %>% 
         as.integer(), year.iso = lubridate::isoyear(index) %>% as.integer(), half = lubridate::semester(index) %>% 
         as.integer(), quarter = lubridate::quarter(index) %>% as.integer(), month = lubridate::month(index) %>% 
         as.integer(), month.xts = as.integer(lubridate::month(index)) - 1L, month.lbl = lubridate::month(index, 
         label = TRUE, abbr = FALSE), day = lubridate::day(index) %>% as.integer(), hour = lubridate::hour(index) %>% 
         as.integer(), minute = lubridate::minute(index) %>% as.integer(), second = lubridate::second(index) %>% 
         as.integer(), hour12 = stringi::stri_datetime_fields(lubridate::as_datetime(index))$Hour12, 
         am.pm = stringi::stri_datetime_fields(lubridate::as_datetime(index))$AmPm, wday = lubridate::wday(index) %>% 
             as.integer(), wday.xts = as.integer(lubridate::wday(index)) - 1L, wday.lbl = lubridate::wday(index, 
             label = TRUE, abbr = FALSE), mday = lubridate::mday(index) %>% as.integer(), 
         qday = lubridate::qday(lubridate::as_date(index)) %>% as.integer(), yday = lubridate::yday(index) %>% 
             as.integer(), mweek = stringi::stri_datetime_fields(lubridate::as_date(index))$WeekOfMonth %>% 
             as.integer(), week = lubridate::week(index) %>% as.integer(), week.iso = lubridate::isoweek(index) %>% 
             as.integer(), week2 = as.integer(week%%2), week3 = as.integer(week%%3), week4 = as.integer(week%%4), 
         mday7 = as.integer(mday%/%7) + 1L)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: withVisible(function_list[[k]](value))
  11: function_list[[k]](value)
  12: dplyr::mutate(., index.num = as.numeric(as.POSIXct(index)) %>% as.integer(), diff = c(NA, 
         diff(index.num)) %>% as.integer(), year = lubridate::year(index) %>% as.integer(), 
         year.iso = lubridate::isoyear(index) %>% as.integer(), half = lubridate::semester(index) %>% 
             as.integer(), quarter = lubridate::quarter(index) %>% as.integer(), month = lubridate::month(index) %>% 
             as.integer(), month.xts = as.integer(lubridate::month(index)) - 1L, month.lbl = lubridate::month(index, 
             label = TRUE, abbr = FALSE), day = lubridate::day(index) %>% as.integer(), 
         hour = lubridate::hour(index) %>% as.integer(), minute = lubridate::minute(index) %>% 
             as.integer(), second = lubridate::second(index) %>% as.integer(), hour12 = stringi::stri_datetime_fields(lubridate::as_datetime(index))$Hour12, 
         am.pm = stringi::stri_datetime_fields(lubridate::as_datetime(index))$AmPm, wday = lubridate::wday(index) %>% 
             as.integer(), wday.xts = as.integer(lubridate::wday(index)) - 1L, wday.lbl = lubridate::wday(index, 
             label = TRUE, abbr = FALSE), mday = lubridate::mday(index) %>% as.integer(), 
         qday = lubridate::qday(lubridate::as_date(index)) %>% as.integer(), yday = lubridate::yday(index) %>% 
             as.integer(), mweek = stringi::stri_datetime_fields(lubridate::as_date(index))$WeekOfMonth %>% 
             as.integer(), week = lubridate::week(index) %>% as.integer(), week.iso = lubridate::isoweek(index) %>% 
             as.integer(), week2 = as.integer(week%%2), week3 = as.integer(week%%3), week4 = as.integer(week%%4), 
         mday7 = as.integer(mday%/%7) + 1L)
  13: mutate.tbl_df(., index.num = as.numeric(as.POSIXct(index)) %>% as.integer(), diff = c(NA, 
         diff(index.num)) %>% as.integer(), year = lubridate::year(index) %>% as.integer(), 
         year.iso = lubridate::isoyear(index) %>% as.integer(), half = lubridate::semester(index) %>% 
             as.integer(), quarter = lubridate::quarter(index) %>% as.integer(), month = lubridate::month(index) %>% 
             as.integer(), month.xts = as.integer(lubridate::month(index)) - 1L, month.lbl = lubridate::month(index, 
             label = TRUE, abbr = FALSE), day = lubridate::day(index) %>% as.integer(), 
         hour = lubridate::hour(index) %>% as.integer(), minute = lubridate::minute(index) %>% 
             as.integer(), second = lubridate::second(index) %>% as.integer(), hour12 = stringi::stri_datetime_fields(lubridate::as_datetime(index))$Hour12, 
         am.pm = stringi::stri_datetime_fields(lubridate::as_datetime(index))$AmPm, wday = lubridate::wday(index) %>% 
             as.integer(), wday.xts = as.integer(lubridate::wday(index)) - 1L, wday.lbl = lubridate::wday(index, 
             label = TRUE, abbr = FALSE), mday = lubridate::mday(index) %>% as.integer(), 
         qday = lubridate::qday(lubridate::as_date(index)) %>% as.integer(), yday = lubridate::yday(index) %>% 
             as.integer(), mweek = stringi::stri_datetime_fields(lubridate::as_date(index))$WeekOfMonth %>% 
             as.integer(), week = lubridate::week(index) %>% as.integer(), week.iso = lubridate::isoweek(index) %>% 
             as.integer(), week2 = as.integer(week%%2), week3 = as.integer(week%%3), week4 = as.integer(week%%4), 
         mday7 = as.integer(mday%/%7) + 1L)
  14: mutate_impl(.data, dots)
  
  ── 3. Error: tk_index(decomposed.ts) test returns correct format. (@test_tk_inde
  Evaluation error: do not know how to convert 'index' to class "Date".
  1: USAccDeaths %>% tk_tbl() %>% mutate(index = as_date(index)) %>% tk_ts(start = 1973, 
         freq = 12, silent = T) at testthat/test_tk_index.R:324
  2: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  3: eval(quote(`_fseq`(`_lhs`)), env, env)
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: `_fseq`(`_lhs`)
  6: freduce(value, `_function_list`)
  7: function_list[[i]](value)
  8: mutate(., index = as_date(index))
  9: mutate.tbl_df(., index = as_date(index))
  10: mutate_impl(.data, dots)
  
  ── 4. Error: tk_make_future_timeseries(date) test returns correct format. (@test
  do not know how to convert '.' to class "Date"
  1: expect_equal(tk_make_future_timeseries(test_date, n_future = 2), expectation) at testthat/test_tk_make_future_timeseries.R:135
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: tk_make_future_timeseries(test_date, n_future = 2)
  5: tk_make_future_timeseries.Date(test_date, n_future = 2)
  6: zoo::as.yearmon(idx) %>% tk_make_future_timeseries(n_future = n_future, skip_values = skip_values, 
         insert_values = insert_values) %>% lubridate::as_date()
  7: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  8: eval(quote(`_fseq`(`_lhs`)), env, env)
  9: eval(quote(`_fseq`(`_lhs`)), env, env)
  10: `_fseq`(`_lhs`)
  11: freduce(value, `_function_list`)
  12: withVisible(function_list[[k]](value))
  13: function_list[[k]](value)
  14: lubridate::as_date(.)
  15: lubridate::as_date(.)
  16: as.Date.default(.)
  17: stop(gettextf("do not know how to convert '%s' to class %s", deparse(substitute(x)), 
         dQuote("Date")), domain = NA)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 257 SKIPPED: 0 FAILED: 4
  1. Error: tk_get_timeseries_signature(yearmon) test returns correct format. (@test_tk_get_timeseries.R#40) 
  2. Error: tk_get_timeseries_signature(yearqtr) test returns correct format. (@test_tk_get_timeseries.R#54) 
  3. Error: tk_index(decomposed.ts) test returns correct format. (@test_tk_index.R#324) 
  4. Error: tk_make_future_timeseries(date) test returns correct format. (@test_tk_make_future_timeseries.R#135) 
  
  Error: testthat unit tests failed
  Execution halted