Running ‘testthat.R’ [95s/71s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > 
  > test_check("nhdplusTools")
  Loading required package: nhdplusTools
  Starting 2 test processes.
  > test_02_subset.R: All intersections performed in latitude/longitude.
  > test_02_subset.R: All intersections performed in latitude/longitude.
  > test_02_subset.R: All intersections performed in latitude/longitude.
  > test_02_subset.R: All intersections performed in latitude/longitude.
  Saving _problems/test_index-114.R
  Saving _problems/test_index-151.R
  Saving _problems/test_index-202.R
  Saving _problems/test_wb_index-14.R
  [ FAIL 4 | WARN 0 | SKIP 58 | PASS 300 ]
  
  ══ Skipped tests (58) ══════════════════════════════════════════════════════════
  • On CRAN (58): 'test_00_plot_integration_nhdplus.R:6:3',
    'test_00_plot_bbox_nhdplus.R:5:3', 'test_00_plot_local_extra_nhdplus.R:9:3',
    'test_00_plot_local_nhdplus.R:9:3', 'test_01_get_nldi.R:5:3',
    'test_01_get_nldi.R:25:3', 'test_01_get_nldi.R:85:3',
    'test_01_get_nldi.R:122:3', 'test_01_get_nldi.R:140:3',
    'test_01_get_nldi.R:176:3', 'test_01_get_nldi.R:224:3',
    'test_00_plot_nhdplus.R:6:3', 'test_00_plot_nhdplus.R:90:3',
    'test_00_plot_nhdplus.R:134:3', 'test_00_plot_nhdplus.R:164:3',
    'test_00_plot_nhdplus.R:201:3', 'test_02_subset.R:135:3',
    'test_02_subset.R:191:3', 'test_03_get_functions.R:20:3',
    'test_03_get_functions.R:52:3', 'test_03_get_functions.R:75:3',
    'test_03_get_functions.R:129:3', 'test_03_get_functions.R:200:3',
    'test_03_get_functions.R:216:3', 'test_03_get_functions.R:229:3',
    'test_03_get_functions.R:247:3', 'test_03_get_functions.R:254:3',
    'test_arcrest.R:51:3', 'test_02_subset_extras.R:94:3',
    'test_02_subset_extras.R:149:3', 'test_geoconnex.R:3:3',
    'test_geoconnex.R:14:3', 'test_get_3dhp.R:3:3', 'test_get_nhdphr.R:3:3',
    'test_get_nhdplus.R:8:3', 'test_get_nhdplus.R:29:3',
    'test_get_nhdplus.R:49:3', 'test_get_nhdplushr.R:3:3',
    'test_get_nhdplushr.R:23:3', 'test_get_nhdplushr.R:53:3',
    'test_get_nhdplushr.R:80:3', 'test_get_nhdplushr.R:101:3',
    'test_get_nhdplushr.R:147:3', 'test_get_nhdplushr.R:174:3',
    'test_get_nhdplushr.R:196:3', 'test_get_codes.R:4:3', 'test_get_vaa.R:4:3',
    'test_get_vaa.R:38:3', 'test_index.R:13:5', 'test_index.R:61:3',
    'test_map_nhdplus.R:4:3', 'test_navigate.R:4:3', 'test_navigate.R:71:3',
    'test_nhdplusTools.R:41:3', 'test_nhdplusTools.R:50:3',
    'test_rescale_catchments.R:3:3', 'test_run_plus_attributes.R:20:3',
    'test_get_path.R:69:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_index.R:113:3'): multipart indexing ────────────────────────────
  Error in ``[.data.table`(matched, , `:=`(N, seq_len(.N)), by = list(point_id))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::capture_warnings(...) at test_index.R:113:3
    2. │ └─base::withCallingHandlers(...)
    3. └─nhdplusTools::get_flowline_index(lines, points, search_radius = 500)
    4.   ├─hydroloom::index_points_to_lines(...)
    5.   └─hydroloom:::index_points_to_lines.data.frame(...)
    6.     ├─hydroloom::index_points_to_lines(...)
    7.     └─hydroloom:::index_points_to_lines.hy(...)
    8.       ├─dplyr::left_join(...)
    9.       └─hydroloom:::matcher_dt(x, points, search_radius, max_matches = max_matches)
   10.         ├─matched[, `:=`(N, seq_len(.N)), by = list(point_id)]
   11.         └─data.table:::`[.data.table`(...)
  ── Error ('test_index.R:148:3'): disambiguate ──────────────────────────────────
  Error in ``[.data.table`(matched, , `:=`(N, seq_len(.N)), by = list(point_id))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─nhdplusTools::get_flowline_index(...) at test_index.R:148:3
   2.   ├─hydroloom::index_points_to_lines(...)
   3.   └─hydroloom:::index_points_to_lines.data.frame(...)
   4.     ├─hydroloom::index_points_to_lines(...)
   5.     └─hydroloom:::index_points_to_lines.hy(...)
   6.       ├─dplyr::left_join(...)
   7.       └─hydroloom:::matcher_dt(x, points, search_radius, max_matches = max_matches)
   8.         ├─matched[, `:=`(N, seq_len(.N)), by = list(point_id)]
   9.         └─data.table:::`[.data.table`(...)
  ── Error ('test_index.R:202:3'): get location ──────────────────────────────────
  Error in ``[.data.table`(matched, , `:=`(N, seq_len(.N)), by = list(point_id))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─nhdplusTools::get_flowline_index(sample_flines, points) at test_index.R:202:3
   2.   ├─hydroloom::index_points_to_lines(...)
   3.   └─hydroloom:::index_points_to_lines.data.frame(...)
   4.     ├─hydroloom::index_points_to_lines(...)
   5.     └─hydroloom:::index_points_to_lines.hy(...)
   6.       ├─dplyr::left_join(...)
   7.       └─hydroloom:::matcher_dt(x, points, search_radius, max_matches = max_matches)
   8.         ├─matched[, `:=`(N, seq_len(.N)), by = list(point_id)]
   9.         └─data.table:::`[.data.table`(...)
  ── Error ('test_wb_index.R:14:1'): index to waterbodies ────────────────────────
  Error in ``[.data.table`(matched, , `:=`(N, seq_len(.N)), by = list(point_id))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test_wb_index.R:14:1
    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::get_waterbody_index(wb, gage_l)
    8.   └─hydroloom::index_points_to_waterbodies(...)
    9.     └─hydroloom:::matcher_dt(waterbodies, st_coordinates(points), search_radius)
   10.       ├─matched[, `:=`(N, seq_len(.N)), by = list(point_id)]
   11.       └─data.table:::`[.data.table`(...)
  
  [ FAIL 4 | WARN 0 | SKIP 58 | PASS 300 ]
  Error:
  ! Test failures.
  Execution halted