CRAN Package Check Results for Package metR

Last updated on 2025-12-20 21:49:38 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.18.3 16.45 174.42 190.87 ERROR
r-devel-linux-x86_64-debian-gcc 0.18.3 10.81 113.18 123.99 ERROR
r-devel-linux-x86_64-fedora-clang 0.18.3 27.00 271.06 298.06 ERROR
r-devel-linux-x86_64-fedora-gcc 0.18.3 25.00 257.91 282.91 ERROR
r-devel-windows-x86_64 0.18.3 19.00 328.00 347.00 OK
r-patched-linux-x86_64 0.18.3 16.70 303.53 320.23 OK
r-release-linux-x86_64 0.18.3 13.97 299.23 313.20 OK
r-release-macos-arm64 0.18.3 4.00 84.00 88.00 OK
r-release-macos-x86_64 0.18.3 11.00 308.00 319.00 OK
r-release-windows-x86_64 0.18.3 18.00 332.00 350.00 OK
r-oldrel-macos-arm64 0.18.3 4.00 93.00 97.00 OK
r-oldrel-macos-x86_64 0.18.3 12.00 339.00 351.00 OK
r-oldrel-windows-x86_64 0.18.3 24.00 417.00 441.00 OK

Check Details

Version: 0.18.3
Check: examples
Result: ERROR Running examples in ‘metR-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: EOF > ### Title: Empirical Orthogonal Function > ### Aliases: EOF > > ### ** Examples > > ## Don't show: > data.table::setDTthreads(1) > ## End(Don't show) > # The Antarctic Oscillation is computed from the > # monthly geopotential height anomalies weighted by latitude. > library(data.table) Attaching package: ‘data.table’ The following object is masked from ‘package:base’: %notin% > data(geopotential) > geopotential <- copy(geopotential) > geopotential[, gh.t.w := Anomaly(gh)*sqrt(cos(lat*pi/180)), + by = .(lon, lat, month(date))] Error in `[.data.table`(geopotential, , `:=`(gh.t.w, Anomaly(gh) * sqrt(cos(lat * : attempt access index 5/5 in VECTOR_ELT Calls: [ -> [.data.table Execution halted Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 0.18.3
Check: tests
Result: ERROR Running ‘testthat.R’ [47s/47s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(metR) > # library(vdiffr) > > on_cran <- !isTRUE(as.logical(Sys.getenv("NOT_CRAN", "false"))) > if (on_cran) data.table::setDTthreads(2) > > test_check("metR") Saving _problems/test-eof-6.R Saving _problems/test-eof-11.R Saving _problems/test-eof-18.R Saving _problems/test-eof-31.R Saving _problems/test-eof-36.R Saving _problems/test-eof-44.R Saving _problems/test-eof-60.R Saving _problems/test-eof-65.R Saving _problems/test-imputeeof-8.R Saving _problems/test-interpolate-13.R Saving _problems/test-season-31.R Saving _problems/test-trajectory-4.R Saving _problems/test-vis-geom-relief-14.R Saving _problems/test-vis-text-contour-17.R Saving _problems/test-vis-text-contour-74.R Saving _problems/test-vis-text-contour-87.R Saving _problems/test-waveflux-6.R [ FAIL 17 | WARN 3 | SKIP 16 | PASS 159 ] ══ Skipped tests (16) ══════════════════════════════════════════════════════════ • On CRAN (16): 'test-GetTopography.R:3:5', 'test-ReadNetCDF.R:81:5', 'test-vis-arrow.R:9:1', 'test-vis-arrow.R:31:1', 'test-vis-contour2.R:10:1', 'test-vis-contour2.R:24:1', 'test-vis-contour2.R:34:1', 'test-vis-contour2.R:52:1', 'test-vis-contour2.R:71:1', 'test-vis-contour_fill.R:11:1', 'test-vis-contour_fill.R:25:1', 'test-vis-contour_fill.R:36:1', 'test-vis-discretised-scale.R:12:1', 'test-vis-guide_colorstrip.R:13:1', 'test-vis-streamline.R:18:1', 'test-vis-streamline.R:27:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-eof.R:6:9'): EOF runs ────────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-eof.R:5:5 2. │ └─testthat::quasi_label(enquo(object)) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, n = 1) at test-eof.R:6:9 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:11:5'): EOF, returns correct PCs ───────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:11:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::nrow(EOF(gh ~ lat + lon | date, data = geopotential, n = 2)$sdev) 5. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, n = 2) 6. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 7. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 8. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:18:9'): EOF uses bootstrap ─────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-eof.R:16:5 2. │ └─testthat::quasi_label(enquo(object)) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(...) at test-eof.R:18:9 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:28:5'): can use differnet engine ───────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:28:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, engine = base::svd) 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:35:5'): EOF works inside data.table ────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:35:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─geopotential[, EOF(gh ~ lon + lat | date)$left] 5. └─data.table:::`[.data.table`(...) 6. └─base::eval(jsub, SDenv, parent.frame()) 7. └─base::eval(jsub, SDenv, parent.frame()) 8. └─metR::EOF(gh ~ lon + lat | date) 9. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 10. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 11. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:41:5'): EOF rotates ────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_identical(...) at test-eof.R:41:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(...) 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Failure ('test-eof.R:59:5'): EOF fails gracefully ─────────────────────────── `EOF(gh ~ lon | date, data = geopotential)` threw an error with unexpected message. Expected match: "The formula gh ~ lon | date does not identify an unique observation for each cell." Actual message: "attempt access index 3/3 in VECTOR_ELT" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-eof.R:59:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─metR::EOF(gh ~ lon | date, data = geopotential) 7. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 8. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 9. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:64:5'): eof methods ────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─metR::EOF(...) at test-eof.R:64:5 2. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 3. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 4. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-imputeeof.R:8:1'): (code run outside of `test_that()`) ───────── Error in ``[.data.table`(geopotential, , `:=`(gh.t, Anomaly(gh)), by = .(lat, lon, month(date)))`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─geopotential[, `:=`(gh.t, Anomaly(gh)), by = .(lat, lon, month(date))] at test-imputeeof.R:8:1 2. └─data.table:::`[.data.table`(...) at test-imputeeof.R:8:1 ── Error ('test-interpolate.R:13:5'): interpolate works ──────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_known_value(...) at test-interpolate.R:13:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─geopotential[, Interpolate(gh ~ lon + lat, x.out, y.out)] 5. └─data.table:::`[.data.table`(...) 6. └─base::eval(jsub, SDenv, parent.frame()) 7. └─base::eval(jsub, SDenv, parent.frame()) 8. └─metR::Interpolate(gh ~ lon + lat, x.out, y.out) 9. └─metR:::.tidy2matrix(data, dcast.formula, value.var = value.var) 10. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 11. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-season.R:29:5'): full season works ───────────────────────────── Error in ``[.data.table`(data.table::data.table(times, year, season), , `:=`(n, .N), by = .(year, season))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-season.R:29:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::is.full_season(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-trajectory.R:4:1'): (code run outside of `test_that()`) ──────── Error in ``[.data.table`(geopotential, , `:=`(c("u", "v"), GeostrophicWind(gh, lon, lat)), by = date)`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─...[] at test-trajectory.R:4:1 2. └─data.table:::`[.data.table`(...) at test-trajectory.R:4:1 ── Error ('test-vis-geom-relief.R:11:5'): geom-relief ────────────────────────── Error in `geom_relief(aes(z = value))`: Problem while converting geom to grob. ℹ Error occurred in the 1st layer. Caused by error in `[.data.table`: ! attempt access index 16/16 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-geom-relief.R:11:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─coords[, `:=`(dx, .derv(z, x, fill = TRUE)), by = y] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:13:5'): contour_text wokrs ────────────────── Error in `geom_text_contour(aes(z = gh))`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:13:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:69:5'): stroke.colour is aesthetic ────────── Error in `geom_text_contour(aes(z = gh, stroke.colour = after_stat(level)), stroke = 0.2)`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:69:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:80:5'): geom_label_contour also work ──────── Error in `geom_label_contour(aes(z = gh, fill = after_stat(level)), label.r = unit(0.25, "lines"), label.padding = unit(0.15, "lines"), label.size = 0)`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:80:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(..., self = self) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-waveflux.R:6:5'): waveflux returns w.x and w.y ───────────────── Error in ``[.data.table`(dt, , `:=`(psi.dx = Derivate(psi ~ lonrad, cyclical = TRUE)[[1]], psi.dxx = Derivate(psi ~ lonrad, 2, cyclical = TRUE)[[1]]), by = lat)`: attempt access index 9/9 in VECTOR_ELT Backtrace: ▆ 1. ├─base::with(geo, WaveFlux(gh, u, v, lon, lat, lev = 700)) at test-waveflux.R:6:5 2. └─base::with.default(geo, WaveFlux(gh, u, v, lon, lat, lev = 700)) 3. └─base::eval(substitute(expr), data, enclos = parent.frame()) 4. └─base::eval(substitute(expr), data, enclos = parent.frame()) 5. └─metR::WaveFlux(gh, u, v, lon, lat, lev = 700) 6. ├─...[] 7. └─data.table:::`[.data.table`(...) [ FAIL 17 | WARN 3 | SKIP 16 | PASS 159 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.18.3
Check: re-building of vignette outputs
Result: ERROR Error(s) in re-building vignettes: ... --- re-building ‘Visualization-tools.Rmd’ using knitr Quitting from Visualization-tools.Rmd:25-32 [unnamed-chunk-1] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `[.data.table`: ! attempt access index 4/4 in VECTOR_ELT --- Backtrace: ▆ 1. ├─temperature[, `:=`(air.z, Anomaly(air)), by = .(lat, lev)] 2. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'Visualization-tools.Rmd' failed with diagnostics: attempt access index 4/4 in VECTOR_ELT --- failed re-building ‘Visualization-tools.Rmd’ --- re-building ‘Working-with-data.Rmd’ using knitr Quitting from Working-with-data.Rmd:117-124 [unnamed-chunk-7] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `[.data.table`: ! attempt access index 5/5 in VECTOR_ELT --- Backtrace: ▆ 1. ├─...[] 2. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'Working-with-data.Rmd' failed with diagnostics: attempt access index 5/5 in VECTOR_ELT --- failed re-building ‘Working-with-data.Rmd’ SUMMARY: processing the following files failed: ‘Visualization-tools.Rmd’ ‘Working-with-data.Rmd’ Error: Vignette re-building failed. Execution halted Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 0.18.3
Check: tests
Result: ERROR Running ‘testthat.R’ [31s/37s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(metR) > # library(vdiffr) > > on_cran <- !isTRUE(as.logical(Sys.getenv("NOT_CRAN", "false"))) > if (on_cran) data.table::setDTthreads(2) > > test_check("metR") Saving _problems/test-eof-6.R Saving _problems/test-eof-11.R Saving _problems/test-eof-18.R Saving _problems/test-eof-31.R Saving _problems/test-eof-36.R Saving _problems/test-eof-44.R Saving _problems/test-eof-60.R Saving _problems/test-eof-65.R Saving _problems/test-imputeeof-8.R Saving _problems/test-interpolate-13.R Saving _problems/test-season-31.R Saving _problems/test-trajectory-4.R Saving _problems/test-vis-geom-relief-14.R Saving _problems/test-vis-text-contour-17.R Saving _problems/test-vis-text-contour-74.R Saving _problems/test-vis-text-contour-87.R Saving _problems/test-waveflux-6.R [ FAIL 17 | WARN 3 | SKIP 16 | PASS 159 ] ══ Skipped tests (16) ══════════════════════════════════════════════════════════ • On CRAN (16): 'test-GetTopography.R:3:5', 'test-ReadNetCDF.R:81:5', 'test-vis-arrow.R:9:1', 'test-vis-arrow.R:31:1', 'test-vis-contour2.R:10:1', 'test-vis-contour2.R:24:1', 'test-vis-contour2.R:34:1', 'test-vis-contour2.R:52:1', 'test-vis-contour2.R:71:1', 'test-vis-contour_fill.R:11:1', 'test-vis-contour_fill.R:25:1', 'test-vis-contour_fill.R:36:1', 'test-vis-discretised-scale.R:12:1', 'test-vis-guide_colorstrip.R:13:1', 'test-vis-streamline.R:18:1', 'test-vis-streamline.R:27:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-eof.R:6:9'): EOF runs ────────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-eof.R:5:5 2. │ └─testthat::quasi_label(enquo(object)) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, n = 1) at test-eof.R:6:9 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:11:5'): EOF, returns correct PCs ───────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:11:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::nrow(EOF(gh ~ lat + lon | date, data = geopotential, n = 2)$sdev) 5. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, n = 2) 6. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 7. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 8. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:18:9'): EOF uses bootstrap ─────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-eof.R:16:5 2. │ └─testthat::quasi_label(enquo(object)) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(...) at test-eof.R:18:9 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:28:5'): can use differnet engine ───────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:28:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, engine = base::svd) 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:35:5'): EOF works inside data.table ────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:35:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─geopotential[, EOF(gh ~ lon + lat | date)$left] 5. └─data.table:::`[.data.table`(...) 6. └─base::eval(jsub, SDenv, parent.frame()) 7. └─base::eval(jsub, SDenv, parent.frame()) 8. └─metR::EOF(gh ~ lon + lat | date) 9. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 10. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 11. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:41:5'): EOF rotates ────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_identical(...) at test-eof.R:41:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(...) 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Failure ('test-eof.R:59:5'): EOF fails gracefully ─────────────────────────── `EOF(gh ~ lon | date, data = geopotential)` threw an error with unexpected message. Expected match: "The formula gh ~ lon | date does not identify an unique observation for each cell." Actual message: "attempt access index 3/3 in VECTOR_ELT" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-eof.R:59:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─metR::EOF(gh ~ lon | date, data = geopotential) 7. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 8. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 9. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:64:5'): eof methods ────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─metR::EOF(...) at test-eof.R:64:5 2. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 3. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 4. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-imputeeof.R:8:1'): (code run outside of `test_that()`) ───────── Error in ``[.data.table`(geopotential, , `:=`(gh.t, Anomaly(gh)), by = .(lat, lon, month(date)))`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─geopotential[, `:=`(gh.t, Anomaly(gh)), by = .(lat, lon, month(date))] at test-imputeeof.R:8:1 2. └─data.table:::`[.data.table`(...) at test-imputeeof.R:8:1 ── Error ('test-interpolate.R:13:5'): interpolate works ──────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_known_value(...) at test-interpolate.R:13:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─geopotential[, Interpolate(gh ~ lon + lat, x.out, y.out)] 5. └─data.table:::`[.data.table`(...) 6. └─base::eval(jsub, SDenv, parent.frame()) 7. └─base::eval(jsub, SDenv, parent.frame()) 8. └─metR::Interpolate(gh ~ lon + lat, x.out, y.out) 9. └─metR:::.tidy2matrix(data, dcast.formula, value.var = value.var) 10. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 11. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-season.R:29:5'): full season works ───────────────────────────── Error in ``[.data.table`(data.table::data.table(times, year, season), , `:=`(n, .N), by = .(year, season))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-season.R:29:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::is.full_season(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-trajectory.R:4:1'): (code run outside of `test_that()`) ──────── Error in ``[.data.table`(geopotential, , `:=`(c("u", "v"), GeostrophicWind(gh, lon, lat)), by = date)`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─...[] at test-trajectory.R:4:1 2. └─data.table:::`[.data.table`(...) at test-trajectory.R:4:1 ── Error ('test-vis-geom-relief.R:11:5'): geom-relief ────────────────────────── Error in `geom_relief(aes(z = value))`: Problem while converting geom to grob. ℹ Error occurred in the 1st layer. Caused by error in `[.data.table`: ! attempt access index 16/16 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-geom-relief.R:11:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─coords[, `:=`(dx, .derv(z, x, fill = TRUE)), by = y] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:13:5'): contour_text wokrs ────────────────── Error in `geom_text_contour(aes(z = gh))`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:13:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:69:5'): stroke.colour is aesthetic ────────── Error in `geom_text_contour(aes(z = gh, stroke.colour = after_stat(level)), stroke = 0.2)`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:69:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:80:5'): geom_label_contour also work ──────── Error in `geom_label_contour(aes(z = gh, fill = after_stat(level)), label.r = unit(0.25, "lines"), label.padding = unit(0.15, "lines"), label.size = 0)`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:80:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(..., self = self) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-waveflux.R:6:5'): waveflux returns w.x and w.y ───────────────── Error in ``[.data.table`(dt, , `:=`(psi.dx = Derivate(psi ~ lonrad, cyclical = TRUE)[[1]], psi.dxx = Derivate(psi ~ lonrad, 2, cyclical = TRUE)[[1]]), by = lat)`: attempt access index 9/9 in VECTOR_ELT Backtrace: ▆ 1. ├─base::with(geo, WaveFlux(gh, u, v, lon, lat, lev = 700)) at test-waveflux.R:6:5 2. └─base::with.default(geo, WaveFlux(gh, u, v, lon, lat, lev = 700)) 3. └─base::eval(substitute(expr), data, enclos = parent.frame()) 4. └─base::eval(substitute(expr), data, enclos = parent.frame()) 5. └─metR::WaveFlux(gh, u, v, lon, lat, lev = 700) 6. ├─...[] 7. └─data.table:::`[.data.table`(...) [ FAIL 17 | WARN 3 | SKIP 16 | PASS 159 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-debian-gcc

Version: 0.18.3
Check: examples
Result: ERROR Running examples in ‘metR-Ex.R’ failed The error most likely occurred in: > ### Name: EOF > ### Title: Empirical Orthogonal Function > ### Aliases: EOF > > ### ** Examples > > ## Don't show: > data.table::setDTthreads(1) > ## End(Don't show) > # The Antarctic Oscillation is computed from the > # monthly geopotential height anomalies weighted by latitude. > library(data.table) Attaching package: ‘data.table’ The following object is masked from ‘package:base’: %notin% > data(geopotential) > geopotential <- copy(geopotential) > geopotential[, gh.t.w := Anomaly(gh)*sqrt(cos(lat*pi/180)), + by = .(lon, lat, month(date))] Error in `[.data.table`(geopotential, , `:=`(gh.t.w, Anomaly(gh) * sqrt(cos(lat * : attempt access index 5/5 in VECTOR_ELT Calls: [ -> [.data.table Execution halted Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 0.18.3
Check: tests
Result: ERROR Running ‘testthat.R’ [71s/88s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(metR) > # library(vdiffr) > > on_cran <- !isTRUE(as.logical(Sys.getenv("NOT_CRAN", "false"))) > if (on_cran) data.table::setDTthreads(2) > > test_check("metR") Saving _problems/test-eof-6.R Saving _problems/test-eof-11.R Saving _problems/test-eof-18.R Saving _problems/test-eof-31.R Saving _problems/test-eof-36.R Saving _problems/test-eof-44.R Saving _problems/test-eof-60.R Saving _problems/test-eof-65.R Saving _problems/test-imputeeof-8.R Saving _problems/test-interpolate-13.R Saving _problems/test-season-31.R Saving _problems/test-trajectory-4.R Saving _problems/test-vis-geom-relief-14.R Saving _problems/test-vis-text-contour-17.R Saving _problems/test-vis-text-contour-74.R Saving _problems/test-vis-text-contour-87.R Saving _problems/test-waveflux-6.R [ FAIL 17 | WARN 3 | SKIP 16 | PASS 159 ] ══ Skipped tests (16) ══════════════════════════════════════════════════════════ • On CRAN (16): 'test-GetTopography.R:3:5', 'test-ReadNetCDF.R:81:5', 'test-vis-arrow.R:9:1', 'test-vis-arrow.R:31:1', 'test-vis-contour2.R:10:1', 'test-vis-contour2.R:24:1', 'test-vis-contour2.R:34:1', 'test-vis-contour2.R:52:1', 'test-vis-contour2.R:71:1', 'test-vis-contour_fill.R:11:1', 'test-vis-contour_fill.R:25:1', 'test-vis-contour_fill.R:36:1', 'test-vis-discretised-scale.R:12:1', 'test-vis-guide_colorstrip.R:13:1', 'test-vis-streamline.R:18:1', 'test-vis-streamline.R:27:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-eof.R:6:9'): EOF runs ────────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-eof.R:5:5 2. │ └─testthat::quasi_label(enquo(object)) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, n = 1) at test-eof.R:6:9 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:11:5'): EOF, returns correct PCs ───────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:11:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::nrow(EOF(gh ~ lat + lon | date, data = geopotential, n = 2)$sdev) 5. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, n = 2) 6. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 7. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 8. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:18:9'): EOF uses bootstrap ─────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-eof.R:16:5 2. │ └─testthat::quasi_label(enquo(object)) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(...) at test-eof.R:18:9 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:28:5'): can use differnet engine ───────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:28:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, engine = base::svd) 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:35:5'): EOF works inside data.table ────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:35:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─geopotential[, EOF(gh ~ lon + lat | date)$left] 5. └─data.table:::`[.data.table`(...) 6. └─base::eval(jsub, SDenv, parent.frame()) 7. └─base::eval(jsub, SDenv, parent.frame()) 8. └─metR::EOF(gh ~ lon + lat | date) 9. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 10. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 11. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:41:5'): EOF rotates ────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_identical(...) at test-eof.R:41:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(...) 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Failure ('test-eof.R:59:5'): EOF fails gracefully ─────────────────────────── `EOF(gh ~ lon | date, data = geopotential)` threw an error with unexpected message. Expected match: "The formula gh ~ lon | date does not identify an unique observation for each cell." Actual message: "attempt access index 3/3 in VECTOR_ELT" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-eof.R:59:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─metR::EOF(gh ~ lon | date, data = geopotential) 7. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 8. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 9. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:64:5'): eof methods ────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─metR::EOF(...) at test-eof.R:64:5 2. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 3. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 4. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-imputeeof.R:8:1'): (code run outside of `test_that()`) ───────── Error in ``[.data.table`(geopotential, , `:=`(gh.t, Anomaly(gh)), by = .(lat, lon, month(date)))`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─geopotential[, `:=`(gh.t, Anomaly(gh)), by = .(lat, lon, month(date))] at test-imputeeof.R:8:1 2. └─data.table:::`[.data.table`(...) at test-imputeeof.R:8:1 ── Error ('test-interpolate.R:13:5'): interpolate works ──────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_known_value(...) at test-interpolate.R:13:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─geopotential[, Interpolate(gh ~ lon + lat, x.out, y.out)] 5. └─data.table:::`[.data.table`(...) 6. └─base::eval(jsub, SDenv, parent.frame()) 7. └─base::eval(jsub, SDenv, parent.frame()) 8. └─metR::Interpolate(gh ~ lon + lat, x.out, y.out) 9. └─metR:::.tidy2matrix(data, dcast.formula, value.var = value.var) 10. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 11. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-season.R:29:5'): full season works ───────────────────────────── Error in ``[.data.table`(data.table::data.table(times, year, season), , `:=`(n, .N), by = .(year, season))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-season.R:29:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::is.full_season(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-trajectory.R:4:1'): (code run outside of `test_that()`) ──────── Error in ``[.data.table`(geopotential, , `:=`(c("u", "v"), GeostrophicWind(gh, lon, lat)), by = date)`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─...[] at test-trajectory.R:4:1 2. └─data.table:::`[.data.table`(...) at test-trajectory.R:4:1 ── Error ('test-vis-geom-relief.R:11:5'): geom-relief ────────────────────────── Error in `geom_relief(aes(z = value))`: Problem while converting geom to grob. ℹ Error occurred in the 1st layer. Caused by error in `[.data.table`: ! attempt access index 16/16 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-geom-relief.R:11:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─coords[, `:=`(dx, .derv(z, x, fill = TRUE)), by = y] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:13:5'): contour_text wokrs ────────────────── Error in `geom_text_contour(aes(z = gh))`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:13:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:69:5'): stroke.colour is aesthetic ────────── Error in `geom_text_contour(aes(z = gh, stroke.colour = after_stat(level)), stroke = 0.2)`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:69:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:80:5'): geom_label_contour also work ──────── Error in `geom_label_contour(aes(z = gh, fill = after_stat(level)), label.r = unit(0.25, "lines"), label.padding = unit(0.15, "lines"), label.size = 0)`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:80:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(..., self = self) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-waveflux.R:6:5'): waveflux returns w.x and w.y ───────────────── Error in ``[.data.table`(dt, , `:=`(psi.dx = Derivate(psi ~ lonrad, cyclical = TRUE)[[1]], psi.dxx = Derivate(psi ~ lonrad, 2, cyclical = TRUE)[[1]]), by = lat)`: attempt access index 9/9 in VECTOR_ELT Backtrace: ▆ 1. ├─base::with(geo, WaveFlux(gh, u, v, lon, lat, lev = 700)) at test-waveflux.R:6:5 2. └─base::with.default(geo, WaveFlux(gh, u, v, lon, lat, lev = 700)) 3. └─base::eval(substitute(expr), data, enclos = parent.frame()) 4. └─base::eval(substitute(expr), data, enclos = parent.frame()) 5. └─metR::WaveFlux(gh, u, v, lon, lat, lev = 700) 6. ├─...[] 7. └─data.table:::`[.data.table`(...) [ FAIL 17 | WARN 3 | SKIP 16 | PASS 159 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-fedora-clang

Version: 0.18.3
Check: re-building of vignette outputs
Result: ERROR Error(s) in re-building vignettes: --- re-building ‘Visualization-tools.Rmd’ using knitr Quitting from Visualization-tools.Rmd:25-32 [unnamed-chunk-1] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `[.data.table`: ! attempt access index 4/4 in VECTOR_ELT --- Backtrace: ▆ 1. ├─temperature[, `:=`(air.z, Anomaly(air)), by = .(lat, lev)] 2. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'Visualization-tools.Rmd' failed with diagnostics: attempt access index 4/4 in VECTOR_ELT --- failed re-building ‘Visualization-tools.Rmd’ --- re-building ‘Working-with-data.Rmd’ using knitr Quitting from Working-with-data.Rmd:117-124 [unnamed-chunk-7] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <error/rlang_error> Error in `[.data.table`: ! attempt access index 5/5 in VECTOR_ELT --- Backtrace: ▆ 1. ├─...[] 2. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'Working-with-data.Rmd' failed with diagnostics: attempt access index 5/5 in VECTOR_ELT --- failed re-building ‘Working-with-data.Rmd’ SUMMARY: processing the following files failed: ‘Visualization-tools.Rmd’ ‘Working-with-data.Rmd’ Error: Vignette re-building failed. Execution halted Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc

Version: 0.18.3
Check: tests
Result: ERROR Running ‘testthat.R’ [63s/88s] Running the tests in ‘tests/testthat.R’ failed. Complete output: > library(testthat) > library(metR) > # library(vdiffr) > > on_cran <- !isTRUE(as.logical(Sys.getenv("NOT_CRAN", "false"))) > if (on_cran) data.table::setDTthreads(2) > > test_check("metR") Saving _problems/test-eof-6.R Saving _problems/test-eof-11.R Saving _problems/test-eof-18.R Saving _problems/test-eof-31.R Saving _problems/test-eof-36.R Saving _problems/test-eof-44.R Saving _problems/test-eof-60.R Saving _problems/test-eof-65.R Saving _problems/test-imputeeof-8.R Saving _problems/test-interpolate-13.R Saving _problems/test-season-31.R Saving _problems/test-trajectory-4.R Saving _problems/test-vis-geom-relief-14.R Saving _problems/test-vis-text-contour-17.R Saving _problems/test-vis-text-contour-74.R Saving _problems/test-vis-text-contour-87.R Saving _problems/test-waveflux-6.R [ FAIL 17 | WARN 3 | SKIP 16 | PASS 159 ] ══ Skipped tests (16) ══════════════════════════════════════════════════════════ • On CRAN (16): 'test-GetTopography.R:3:5', 'test-ReadNetCDF.R:81:5', 'test-vis-arrow.R:9:1', 'test-vis-arrow.R:31:1', 'test-vis-contour2.R:10:1', 'test-vis-contour2.R:24:1', 'test-vis-contour2.R:34:1', 'test-vis-contour2.R:52:1', 'test-vis-contour2.R:71:1', 'test-vis-contour_fill.R:11:1', 'test-vis-contour_fill.R:25:1', 'test-vis-contour_fill.R:36:1', 'test-vis-discretised-scale.R:12:1', 'test-vis-guide_colorstrip.R:13:1', 'test-vis-streamline.R:18:1', 'test-vis-streamline.R:27:1' ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test-eof.R:6:9'): EOF runs ────────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-eof.R:5:5 2. │ └─testthat::quasi_label(enquo(object)) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, n = 1) at test-eof.R:6:9 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:11:5'): EOF, returns correct PCs ───────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:11:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─base::nrow(EOF(gh ~ lat + lon | date, data = geopotential, n = 2)$sdev) 5. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, n = 2) 6. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 7. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 8. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:18:9'): EOF uses bootstrap ─────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_s3_class(...) at test-eof.R:16:5 2. │ └─testthat::quasi_label(enquo(object)) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(...) at test-eof.R:18:9 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:28:5'): can use differnet engine ───────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:28:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(gh ~ lat + lon | date, data = geopotential, engine = base::svd) 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:35:5'): EOF works inside data.table ────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-eof.R:35:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─geopotential[, EOF(gh ~ lon + lat | date)$left] 5. └─data.table:::`[.data.table`(...) 6. └─base::eval(jsub, SDenv, parent.frame()) 7. └─base::eval(jsub, SDenv, parent.frame()) 8. └─metR::EOF(gh ~ lon + lat | date) 9. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 10. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 11. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:41:5'): EOF rotates ────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_identical(...) at test-eof.R:41:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::EOF(...) 5. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 6. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 7. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Failure ('test-eof.R:59:5'): EOF fails gracefully ─────────────────────────── `EOF(gh ~ lon | date, data = geopotential)` threw an error with unexpected message. Expected match: "The formula gh ~ lon | date does not identify an unique observation for each cell." Actual message: "attempt access index 3/3 in VECTOR_ELT" Backtrace: ▆ 1. ├─testthat::expect_error(...) at test-eof.R:59:5 2. │ └─testthat:::quasi_capture(...) 3. │ ├─testthat (local) .capture(...) 4. │ │ └─base::withCallingHandlers(...) 5. │ └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 6. └─metR::EOF(gh ~ lon | date, data = geopotential) 7. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 8. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 9. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-eof.R:64:5'): eof methods ────────────────────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 4/4 in VECTOR_ELT Backtrace: ▆ 1. └─metR::EOF(...) at test-eof.R:64:5 2. └─metR:::.tidy2matrix(data, dcast.formula, value.var, fill = fill) 3. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 4. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-imputeeof.R:8:1'): (code run outside of `test_that()`) ───────── Error in ``[.data.table`(geopotential, , `:=`(gh.t, Anomaly(gh)), by = .(lat, lon, month(date)))`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─geopotential[, `:=`(gh.t, Anomaly(gh)), by = .(lat, lon, month(date))] at test-imputeeof.R:8:1 2. └─data.table:::`[.data.table`(...) at test-imputeeof.R:8:1 ── Error ('test-interpolate.R:13:5'): interpolate works ──────────────────────── Error in ``[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_known_value(...) at test-interpolate.R:13:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. ├─geopotential[, Interpolate(gh ~ lon + lat, x.out, y.out)] 5. └─data.table:::`[.data.table`(...) 6. └─base::eval(jsub, SDenv, parent.frame()) 7. └─base::eval(jsub, SDenv, parent.frame()) 8. └─metR::Interpolate(gh ~ lon + lat, x.out, y.out) 9. └─metR:::.tidy2matrix(data, dcast.formula, value.var = value.var) 10. ├─data[, `:=`(row__, .GRP), by = c(row.vars)] 11. └─data.table:::`[.data.table`(data, , `:=`(row__, .GRP), by = c(row.vars)) ── Error ('test-season.R:29:5'): full season works ───────────────────────────── Error in ``[.data.table`(data.table::data.table(times, year, season), , `:=`(n, .N), by = .(year, season))`: attempt access index 3/3 in VECTOR_ELT Backtrace: ▆ 1. ├─testthat::expect_equal(...) at test-season.R:29:5 2. │ └─testthat::quasi_label(enquo(object), label) 3. │ └─rlang::eval_bare(expr, quo_get_env(quo)) 4. └─metR::is.full_season(...) 5. ├─...[] 6. └─data.table:::`[.data.table`(...) ── Error ('test-trajectory.R:4:1'): (code run outside of `test_that()`) ──────── Error in ``[.data.table`(geopotential, , `:=`(c("u", "v"), GeostrophicWind(gh, lon, lat)), by = date)`: attempt access index 5/5 in VECTOR_ELT Backtrace: ▆ 1. ├─...[] at test-trajectory.R:4:1 2. └─data.table:::`[.data.table`(...) at test-trajectory.R:4:1 ── Error ('test-vis-geom-relief.R:11:5'): geom-relief ────────────────────────── Error in `geom_relief(aes(z = value))`: Problem while converting geom to grob. ℹ Error occurred in the 1st layer. Caused by error in `[.data.table`: ! attempt access index 16/16 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-geom-relief.R:11:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─coords[, `:=`(dx, .derv(z, x, fill = TRUE)), by = y] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:13:5'): contour_text wokrs ────────────────── Error in `geom_text_contour(aes(z = gh))`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:13:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:69:5'): stroke.colour is aesthetic ────────── Error in `geom_text_contour(aes(z = gh, stroke.colour = after_stat(level)), stroke = 0.2)`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:69:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(...) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-vis-text-contour.R:80:5'): geom_label_contour also work ──────── Error in `geom_label_contour(aes(z = gh, fill = after_stat(level)), label.r = unit(0.25, "lines"), label.padding = unit(0.15, "lines"), label.size = 0)`: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─vdiffr::expect_doppelganger(...) at test-vis-text-contour.R:80:5 2. │ └─vdiffr (local) writer(fig, testcase, title) 3. │ ├─vdiffr:::print_plot(plot, title) 4. │ └─vdiffr:::print_plot.ggplot(plot, title) 5. │ ├─base::print(p) 6. │ └─ggplot2 (local) `print.ggplot2::ggplot`(p) 7. │ ├─ggplot2::ggplot_gtable(data) 8. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. │ └─ggplot2:::by_layer(...) 10. │ ├─rlang::try_fetch(...) 11. │ │ ├─base::tryCatch(...) 12. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ │ └─base::withCallingHandlers(...) 16. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. │ └─l$draw_geom(d, layout) 18. │ └─ggplot2 (local) draw_geom(..., self = self) 19. │ └─self$geom$draw_layer(...) 20. │ └─ggplot2 (local) draw_layer(..., self = self) 21. │ └─base::lapply(...) 22. │ └─ggplot2 (local) FUN(X[[i]], ...) 23. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. │ └─self$draw_panel(...) 25. │ └─metR (local) draw_panel(..., self = self) 26. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 27. │ └─data.table:::`[.data.table`(...) 28. └─base::.handleSimpleError(...) 29. └─rlang (local) h(simpleError(msg, call)) 30. └─handlers[[1L]](cnd) 31. └─cli::cli_abort(...) 32. └─rlang::abort(...) ── Error ('test-waveflux.R:6:5'): waveflux returns w.x and w.y ───────────────── Error in ``[.data.table`(dt, , `:=`(psi.dx = Derivate(psi ~ lonrad, cyclical = TRUE)[[1]], psi.dxx = Derivate(psi ~ lonrad, 2, cyclical = TRUE)[[1]]), by = lat)`: attempt access index 9/9 in VECTOR_ELT Backtrace: ▆ 1. ├─base::with(geo, WaveFlux(gh, u, v, lon, lat, lev = 700)) at test-waveflux.R:6:5 2. └─base::with.default(geo, WaveFlux(gh, u, v, lon, lat, lev = 700)) 3. └─base::eval(substitute(expr), data, enclos = parent.frame()) 4. └─base::eval(substitute(expr), data, enclos = parent.frame()) 5. └─metR::WaveFlux(gh, u, v, lon, lat, lev = 700) 6. ├─...[] 7. └─data.table:::`[.data.table`(...) [ FAIL 17 | WARN 3 | SKIP 16 | PASS 159 ] Error: ! Test failures. Execution halted Flavor: r-devel-linux-x86_64-fedora-gcc