Running ‘testthat.R’ [53s/64s]
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")
  [ FAIL 10 | WARN 1 | SKIP 20 | PASS 166 ]
  
  ══ Skipped tests (20) ══════════════════════════════════════════════════════════
  • On CRAN (20): 'test-GetTopography.R:3:5', 'test-ReadNetCDF.R:66:5',
    'test-vis-arrow.R:10:5', 'test-vis-arrow.R:36:5', 'test-vis-contour2.R:10:5',
    'test-vis-contour2.R:24:5', 'test-vis-contour2.R:35:5',
    'test-vis-contour2.R:52:5', 'test-vis-contour2.R:71:5',
    'test-vis-contour_fill.R:10:5', 'test-vis-contour_fill.R:24:5',
    'test-vis-contour_fill.R:40:5', 'test-vis-discretised-scale.R:13:5',
    'test-vis-geom-relief.R:9:5', 'test-vis-guide_colorstrip.R:13:5',
    'test-vis-streamline.R:22:5', 'test-vis-streamline.R:28:5',
    'test-vis-text-contour.R:11:5', 'test-vis-text-contour.R:67:5',
    'test-vis-text-contour.R:78:5'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-ReadNetCDF.R:6:5'): returns a data.table ───────────────────────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
      ▆
   1. ├─testthat::expect_s3_class(ReadNetCDF(file), "data.table") at test-ReadNetCDF.R:6:5
   2. │ └─testthat::quasi_label(enquo(object), arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metR::ReadNetCDF(file)
   5.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   6.     └─metR:::stopf(...)
  ── Error ('test-ReadNetCDF.R:11:5'): GlanceNetCDF prints nicely ────────────────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
       ▆
    1. ├─testthat::expect_known_output(print(GlanceNetCDF(file)), "GlanceNetCDF") at test-ReadNetCDF.R:11:5
    2. │ ├─base::append(act, eval_with_output(object, print = print, width = width))
    3. │ └─testthat:::eval_with_output(object, print = print, width = width)
    4. │   ├─withr::with_output_sink(path, withVisible(code))
    5. │   │ └─base::force(code)
    6. │   └─base::withVisible(code)
    7. ├─base::print(GlanceNetCDF(file))
    8. └─metR::GlanceNetCDF(file)
    9.   └─metR::ReadNetCDF(file, out = "vars")
   10.     └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   11.       └─metR:::stopf(...)
  ── Error ('test-ReadNetCDF.R:16:5'): subsetting works ──────────────────────────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
      ▆
   1. └─metR::ReadNetCDF(file, subset = list(lat = -90:20)) at test-ReadNetCDF.R:16:5
   2.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   3.     └─metR:::stopf(...)
  ── Error ('test-ReadNetCDF.R:32:9'): naming works ──────────────────────────────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
      ▆
   1. ├─testthat::expect_true(...) at test-ReadNetCDF.R:31:5
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metR::ReadNetCDF(file, vars = c(air2 = "air")) at test-ReadNetCDF.R:32:9
   5.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   6.     └─metR:::stopf(...)
  ── Error ('test-ReadNetCDF.R:38:5'): different outs work ───────────────────────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
      ▆
   1. ├─testthat::expect_s3_class(ReadNetCDF(file), "data.table") at test-ReadNetCDF.R:38:5
   2. │ └─testthat::quasi_label(enquo(object), arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metR::ReadNetCDF(file)
   5.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   6.     └─metR:::stopf(...)
  ── Error ('test-ReadNetCDF.R:47:5'): time dimension without 'since' works ──────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
      ▆
   1. └─metR::ReadNetCDF(file) at test-ReadNetCDF.R:47:5
   2.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   3.     └─metR:::stopf(...)
  ── Error ('test-ReadNetCDF.R:53:5'): can parse calendar correcly ───────────────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
      ▆
   1. └─metR::ReadNetCDF(file, vars = "zg") at test-ReadNetCDF.R:53:5
   2.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   3.     └─metR:::stopf(...)
  ── Failure ('test-ReadNetCDF.R:60:5'): can read from nc_open ───────────────────
  `ReadNetCDF(nc)` threw an error.
  Message: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Class:   simpleError/error/condition
  Backtrace:
      ▆
   1. ├─testthat::expect_error(ReadNetCDF(nc), NA) at test-ReadNetCDF.R:60: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::ReadNetCDF(nc)
   7.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   8.     └─metR:::stopf(...)
  ── Error ('test-ReadNetCDF.R:76:5'): can read variables with no dimension ──────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
      ▆
   1. ├─testthat::expect_equal(ReadNetCDF(file, "projection"), 1) at test-ReadNetCDF.R:76:5
   2. │ └─testthat::quasi_label(enquo(object), label, arg = "object")
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─metR::ReadNetCDF(file, "projection")
   5.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   6.     └─metR:::stopf(...)
  ── Error ('test-ReadNetCDF.R:82:5'): function in vars works ────────────────────
  Error in `check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")`: ReadNetCDF needs packages PCICt. Install them with: 'install.packages(c("PCICt"))'.
  Backtrace:
      ▆
   1. └─metR::ReadNetCDF(file, vars = "o3_conc") at test-ReadNetCDF.R:82:5
   2.   └─metR:::check_packages(c("ncdf4", "PCICt"), "ReadNetCDF")
   3.     └─metR:::stopf(...)
  
  [ FAIL 10 | WARN 1 | SKIP 20 | PASS 166 ]
  Error: Test failures
  Execution halted