Running ‘testthat.R’ [21s/24s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > 
  > test_check("nhdplusTools")
  Loading required package: nhdplusTools
  USGS Support Package: https://owi.usgs.gov/R/packages.html#support
  Starting 2 test processes
  [ FAIL 22 | WARN 78 | SKIP 36 | PASS 52 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (36)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_02_subset.R:34'): subset runs as expected ──────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. └─sf::read_sf(sample_data, "NHDFlowline_Network") at test_02_subset.R:34:2
   2.   ├─sf::st_read(...)
   3.   └─sf:::st_read.character(...)
   4.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_02_subset_extras.R:12'): subset by bounding box ────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. └─nhdplusTools::subset_nhdplus(...) at test_02_subset_extras.R:12:2
   2.   ├─stats::setNames(...)
   3.   └─base::lapply(...)
   4.     └─nhdplusTools (local) FUN(X[[i]], ...)
   5.       ├─sf::st_zm(sf::read_sf(data_path, layer_name))
   6.       └─sf::read_sf(data_path, layer_name)
   7.         ├─sf::st_read(...)
   8.         └─sf:::st_read.character(...)
   9.           └─sf:::CPL_read_ogr(...)
  ── Error ('test_02_subset_extras.R:83'): prep_nhdplus runs as expected ─────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test_02_subset_extras.R:83:2
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─nhdplusTools::stage_national_data()
    8.   ├─sf::st_zm(sf::read_sf(nhdplus_data, get_flowline_layer_name(nhdplus_data)))
    9.   └─sf::read_sf(nhdplus_data, get_flowline_layer_name(nhdplus_data))
   10.     ├─sf::st_read(...)
   11.     └─sf:::st_read.character(...)
   12.       └─sf:::CPL_read_ogr(...)
  ── Error ('test_02_subset_extras.R:126'): by rpu ───────────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. └─nhdplusTools::stage_national_data(output_path = tempdir()) at test_02_subset_extras.R:126:2
   2.   ├─sf::st_zm(sf::read_sf(nhdplus_data, get_flowline_layer_name(nhdplus_data)))
   3.   └─sf::read_sf(nhdplus_data, get_flowline_layer_name(nhdplus_data))
   4.     ├─sf::st_read(...)
   5.     └─sf:::st_read.character(...)
   6.       └─sf:::CPL_read_ogr(...)
  ── Error ('test_align_nhdplus_names.R:1'): (code run outside of `test_that()`) ──
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata/new_hope_data.R", package = "nhdplusTools")) at test_align_nhdplus_names.R:1:0
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_codes.R:1'): (code run outside of `test_that()`) ───────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "walker_data.R", package = "nhdplusTools")) at test_get_codes.R:1:0
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_geometry.R:4'): get_node ───────────────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. └─sf::read_sf(sample_data, "NHDFlowline_Network") at test_get_geometry.R:4:2
   2.   ├─sf::st_read(...)
   3.   └─sf:::st_read.character(...)
   4.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_geometry.R:28'): fix_flowdir ───────────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. └─sf::read_sf(sample_data, "NHDFlowline_Network") at test_get_geometry.R:28:2
   2.   ├─sf::st_read(...)
   3.   └─sf:::st_read.character(...)
   4.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_calc_network.R:4'): total drainage area works ──────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "walker_data.R", package = "nhdplusTools")) at test_calc_network.R:4:2
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_calc_network.R:27'): arbolate sum works ────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "walker_data.R", package = "nhdplusTools")) at test_calc_network.R:27:2
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_calc_network.R:45'): get_terminal ──────────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
       ▆
    1. ├─base::suppressMessages(...) at test_calc_network.R:45:2
    2. │ └─base::withCallingHandlers(...)
    3. ├─base::source(system.file("extdata/nhdplushr_data.R", package = "nhdplusTools"))
    4. │ ├─base::withVisible(eval(ei, envir))
    5. │ └─base::eval(ei, envir)
    6. │   └─base::eval(ei, envir)
    7. └─nhdplusTools::get_nhdplushr(...)
    8.   └─base::lapply(gdbs, get_hr_data, layer = layer, ...)
    9.     └─nhdplusTools (local) FUN(X[[i]], ...)
   10.       ├─dplyr::left_join(st_zm(read_sf(gdb, layer)), hr_data, by = "NHDPlusID")
   11.       ├─sf::st_zm(read_sf(gdb, layer))
   12.       └─sf::read_sf(gdb, layer)
   13.         ├─sf::st_read(...)
   14.         └─sf:::st_read.character(...)
   15.           └─sf:::CPL_read_ogr(...)
  ── Error ('test_calc_network.R:76'): get_terminal ──────────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "walker_data.R", package = "nhdplusTools")) at test_calc_network.R:76:2
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_nhdplus.R:3'): (code run outside of `test_that()`) ─────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "sample_flines.R", package = "nhdplusTools")) at test_get_nhdplus.R:3:0
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, "petapsco_flowlines.gpkg"))
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_network.R:3'): (code run outside of `test_that()`) ─────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "sample_flines.R", package = "nhdplusTools")) at test_get_network.R:3:0
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, "petapsco_flowlines.gpkg"))
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_nhdplushr.R:16'): (code run outside of `test_that()`) ──────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. └─nhdplusTools::get_nhdplushr(work_dir, out_gpkg = out_gpkg) at test_get_nhdplushr.R:16:0
   2.   └─base::lapply(gdbs, get_hr_data, layer = layer, ...)
   3.     └─nhdplusTools (local) FUN(X[[i]], ...)
   4.       ├─dplyr::left_join(st_zm(read_sf(gdb, layer)), hr_data, by = "NHDPlusID")
   5.       ├─sf::st_zm(read_sf(gdb, layer))
   6.       └─sf::read_sf(gdb, layer)
   7.         ├─sf::st_read(...)
   8.         └─sf:::st_read.character(...)
   9.           └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_path_lengths.R:3'): path_lengths ───────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "walker_data.R", package = "nhdplusTools")) at test_get_path_lengths.R:3:2
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_path_lengths.R:44'): get_partial_length ────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "walker_data.R", package = "nhdplusTools")) at test_get_path_lengths.R:44:2
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_index.R:3'): (code run outside of `test_that()`) ───────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "sample_flines.R", package = "nhdplusTools")) at test_index.R:3:0
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, "petapsco_flowlines.gpkg"))
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_nhdplusTools.R:3'): (code run outside of `test_that()`) ────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "sample_flines.R", package = "nhdplusTools")) at test_nhdplusTools.R:3:0
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, "petapsco_flowlines.gpkg"))
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_path.R:14'): calculate level path ──────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata", "walker_data.R", package = "nhdplusTools")) at test_get_path.R:14:2
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_get_path.R:102'): from vignette works ──────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. ├─base::source(system.file("extdata/new_hope_data.R", package = "nhdplusTools")) at test_get_path.R:102:2
   2. │ ├─base::withVisible(eval(ei, envir))
   3. │ └─base::eval(ei, envir)
   4. │   └─base::eval(ei, envir)
   5. └─sf::read_sf(file.path(data_dir, f), "NHDFlowline_Network")
   6.   ├─sf::st_read(...)
   7.   └─sf:::st_read.character(...)
   8.     └─sf:::CPL_read_ogr(...)
  ── Error ('test_wb_index.R:4'): index to waterbodies ───────────────────────────
  <Rcpp::eval_error/C++Error/error/condition>
  Error in `CPL_read_ogr(dsn, layer, query, as.character(options), quiet, 
      type, fid_column_name, drivers, wkt_filter, promote_to_multi, 
      int64_as_string, dsn_exists, dsn_isdb, getOption("width"))`: Evaluation error: a valid "POSIXlt" object has names.
  Backtrace:
      ▆
   1. └─sf::read_sf(sample_data, "NHDWaterbody") at test_wb_index.R:4:0
   2.   ├─sf::st_read(...)
   3.   └─sf:::st_read.character(...)
   4.     └─sf:::CPL_read_ogr(...)
  
  [ FAIL 22 | WARN 78 | SKIP 36 | PASS 52 ]
  Error: Test failures
  Execution halted