Running ‘testthat.R’ [49s/118s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(weathercan)
  > 
  > Sys.setenv("R_TESTS" = "")
  > 
  > test_check("weathercan")
  ── 1. Error: weather_interp (hour) interpolates particular columns (@test_01_int
  `i` must have one dimension, not 2.
  Backtrace:
    1. testthat::expect_silent(a <- weather_interp(f, k, cols = m))
    9. weathercan::weather_interp(f, k, cols = m)
   11. tibble:::`[.tbl_df`(weather, !is.na(weather[, col]), )
   12. tibble:::tbl_subset_row(xo, i = i, i_arg)
   13. tibble:::vectbl_as_row_index(i, x, i_arg)
   14. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   21. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 2. Error: weather_interp (hour) interpolates 'all' (@test_01_interpolate.R#20
  `i` must have one dimension, not 2.
  Backtrace:
    1. testthat::expect_message(a <- weather_interp(f, k))
    6. weathercan::weather_interp(f, k)
    8. tibble:::`[.tbl_df`(weather, !is.na(weather[, col]), )
    9. tibble:::tbl_subset_row(xo, i = i, i_arg)
   10. tibble:::vectbl_as_row_index(i, x, i_arg)
   11. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   18. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 3. Error: weather_interp (hour) fails on character columns (@test_01_interpol
  `i` must have one dimension, not 2.
  Backtrace:
    1. testthat::expect_message(...)
    6. weathercan::weather_interp(f, k, cols = c("temp", "rel_hum"))
    8. tibble:::`[.tbl_df`(weather, !is.na(weather[, col]), )
    9. tibble:::tbl_subset_row(xo, i = i, i_arg)
   10. tibble:::vectbl_as_row_index(i, x, i_arg)
   11. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   18. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 4. Error: weather_interp (hour) quiet (@test_01_interpolate.R#228)  ─────────
  `i` must have one dimension, not 2.
  Backtrace:
    1. testthat::expect_message(weather_interp(f, k, cols = "temp"))
    6. weathercan::weather_interp(f, k, cols = "temp")
    8. tibble:::`[.tbl_df`(weather, !is.na(weather[, col]), )
    9. tibble:::tbl_subset_row(xo, i = i, i_arg)
   10. tibble:::vectbl_as_row_index(i, x, i_arg)
   11. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   18. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 5. Failure: weather_interp (day) interpolates particular columns (@test_01_in
  `a <- weather_interp(f, k, cols = m, interval = "day")` threw an error.
  Message: `i` must have one dimension, not 2.
  Class:   simpleError/error/condition
  Backtrace:
    1. testthat::expect_message(...)
   11. weathercan::weather_interp(f, k, cols = m, interval = "day")
   13. tibble:::`[.tbl_df`(weather, !is.na(weather[, col]), )
   14. tibble:::tbl_subset_row(xo, i = i, i_arg)
   15. tibble:::vectbl_as_row_index(i, x, i_arg)
   16. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   23. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 6. Failure: weather_interp (day) interpolates particular columns (@test_01_in
  `expect_error(...)` did not produce any messages.
  
  ── 7. Error: weather_interp (day) interpolates particular columns (@test_01_inte
  object 'a' not found
  Backtrace:
   1. testthat::expect_named(a, c(names(f), m))
   2. testthat::quasi_label(enquo(object), label, arg = "object")
   3. rlang::eval_bare(expr, quo_get_env(quo))
  
  ── 8. Error: weather_interp (day) interpolates 'all' (@test_01_interpolate.R#289
  `i` must have one dimension, not 2.
  Backtrace:
    1. testthat::expect_message(a <- weather_interp(f, k, interval = "day"))
    6. weathercan::weather_interp(f, k, interval = "day")
    8. tibble:::`[.tbl_df`(weather, !is.na(weather[, col]), )
    9. tibble:::tbl_subset_row(xo, i = i, i_arg)
   10. tibble:::vectbl_as_row_index(i, x, i_arg)
   11. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   18. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 9. Error: weather_interp (day) skips character columns (@test_01_interpolate.
  `i` must have one dimension, not 2.
  Backtrace:
    1. testthat::expect_message(...)
    6. weathercan::weather_interp(...)
    8. tibble:::`[.tbl_df`(weather, !is.na(weather[, col]), )
    9. tibble:::tbl_subset_row(xo, i = i, i_arg)
   10. tibble:::vectbl_as_row_index(i, x, i_arg)
   11. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   18. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 10. Error: weather_interp messages (@test_01_interpolate.R#326)  ────────────
  `i` must have one dimension, not 2.
  Backtrace:
    1. testthat::expect_message(...)
    6. weathercan::weather_interp(f, k, interval = "day", cols = "max_temp")
    8. tibble:::`[.tbl_df`(weather, !is.na(weather[, col]), )
    9. tibble:::tbl_subset_row(xo, i = i, i_arg)
   10. tibble:::vectbl_as_row_index(i, x, i_arg)
   11. tibble:::vectbl_as_row_location(i, nr, i_arg, assign)
   18. vctrs::vec_as_location(i, n, arg = as_label(i_arg))
  
  ── 11. Error: weather_dl hour alerts to change in time handling (@test_06_weathe
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. testthat::expect_message(...)
   6. weathercan::weather_dl(...)
   7. base::Ops.data.frame(temp, "")
   8. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 12. Error: weather (hour) returns a data frame (@test_06_weather_dl.R#25)  ──
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 13. Error: weather (hour) formats timezone display (@test_06_weather_dl.R#58)
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 14. Error: weather (hour) formats NL timezone (@test_06_weather_dl.R#70)  ───
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 15. Error: weather (hour) multiple stations (@test_06_weather_dl.R#86)  ─────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 16. Error: weather (hour) formats time_disp with multiple stations (@test_06_
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 17. Error: weather (hour) gets all (@test_06_weather_dl.R#122)  ─────────────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 18. Error: weather (hour) trims NAs (@test_06_weather_dl.R#139)  ────────────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. testthat::expect_equal(...)
   5. weathercan::weather_dl(...)
   6. base::Ops.data.frame(temp, "")
   7. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 19. Error: weather (hour) verbose and quiet (@test_06_weather_dl.R#195)  ────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. testthat::expect_message(...)
   6. weathercan::weather_dl(...)
   7. base::Ops.data.frame(temp, "")
   8. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 20. Error: weather (day) returns a data frame (@test_06_weather_dl.R#254)  ──
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. testthat::expect_message(...)
   6. weathercan::weather_dl(...)
   7. base::Ops.data.frame(temp, "")
   8. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 21. Error: weather (day) gets all, one year (@test_06_weather_dl.R#288)  ────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 22. Error: weather (day) crosses the year line (@test_06_weather_dl.R#327)  ─
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 23. Error: weather (day) trims NAs (@test_06_weather_dl.R#339)  ─────────────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 24. Error: weather (day) mutliple stations (@test_06_weather_dl.R#358)  ─────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. testthat::expect_message(...)
   6. weathercan::weather_dl(...)
   7. base::Ops.data.frame(temp, "")
   8. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 25. Error: weather (day) verbose and quiet (@test_06_weather_dl.R#425)  ─────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. testthat::expect_message(...)
   6. weathercan::weather_dl(...)
   7. base::Ops.data.frame(temp, "")
   8. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 26. Error: weather (month) returns a data frame (@test_06_weather_dl.R#492)  
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 27. Error: weather (month) multiple stations (@test_06_weather_dl.R#580)  ───
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 28. Failure: weather (month) multiple stations (one NA) (@test_06_weather_dl.
  `... <- NULL` threw an error.
  Message: length of 'dimnames' [2] not equal to array extent
  Class:   simpleError/error/condition
  Backtrace:
    1. testthat::expect_message(...)
   11. weathercan::weather_dl(...)
   12. base::Ops.data.frame(temp, "")
   13. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 29. Failure: weather (month) multiple stations (one NA) (@test_06_weather_dl.
  `expect_error(...)` did not produce any messages.
  
  ── 30. Error: weather (month) multiple stations (one NA) (@test_06_weather_dl.R#
  object 'w' not found
  Backtrace:
   1. testthat::expect_equal(unique(w$station_name), c("MAGOG"))
   4. base::unique(w$station_name)
  
  ── 31. Error: weather (month) verbose and quiet (@test_06_weather_dl.R#616)  ───
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. testthat::expect_message(...)
   6. weathercan::weather_dl(...)
   7. base::Ops.data.frame(temp, "")
   8. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 32. Error: weather (month) crosses the year line (@test_06_weather_dl.R#672) 
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
    1. testthat::expect_silent(...)
    9. weathercan::weather_dl(...)
   10. base::Ops.data.frame(temp, "")
   11. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 33. Error: list_col=TRUE and interval=hour groups on the right level  ───────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. weathercan::weather_dl(...)
   2. base::Ops.data.frame(temp, "")
   3. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 34. Error: list_col=TRUE and interval=day groups on the right level  ────────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. weathercan::weather_dl(...)
   2. base::Ops.data.frame(temp, "")
   3. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 35. Error: list_col=TRUE and interval=month groups on the right level  ──────
  length of 'dimnames' [2] not equal to array extent
  Backtrace:
   1. weathercan::weather_dl(...)
   2. base::Ops.data.frame(temp, "")
   3. base::matrix(value, nrow = nr, dimnames = list(rn, cn))
  
  ── 36. Failure: weather_dl() hour format = FALSE (@test_07_weather_args.R#25)  ─
  w$prov[1] not equal to "BC".
  names for target but not for current
  
  ── 37. Failure: weather_dl() day format = FALSE (@test_07_weather_args.R#52)  ──
  w$prov[1] not equal to "BC".
  names for target but not for current
  
  ── 38. Failure: weather_dl() month format = FALSE (@test_07_weather_args.R#81)  
  w$prov[1] not equal to "QC".
  names for target but not for current
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 331 | SKIPPED: 17 | WARNINGS: 0 | FAILED: 38 ]
  1. Error: weather_interp (hour) interpolates particular columns (@test_01_interpolate.R#182) 
  2. Error: weather_interp (hour) interpolates 'all' (@test_01_interpolate.R#202) 
  3. Error: weather_interp (hour) fails on character columns (@test_01_interpolate.R#219) 
  4. Error: weather_interp (hour) quiet (@test_01_interpolate.R#228) 
  5. Failure: weather_interp (day) interpolates particular columns (@test_01_interpolate.R#265) 
  6. Failure: weather_interp (day) interpolates particular columns (@test_01_interpolate.R#265) 
  7. Error: weather_interp (day) interpolates particular columns (@test_01_interpolate.R#270) 
  8. Error: weather_interp (day) interpolates 'all' (@test_01_interpolate.R#289) 
  9. Error: weather_interp (day) skips character columns (@test_01_interpolate.R#313) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted