Running ‘testthat.R’ [50s/27s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/tests.html
  > # * https://testthat.r-lib.org/reference/test_package.html#special-files
  > 
  > library(testthat)
  > library(hydroloom)
  > 
  > test_check("hydroloom")
  Starting 2 test processes.
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
  > test_check_hy_graph.R: 
    |                                                                            
    |==========================================================            |  83%
  > test_check_hy_graph.R: found loop at 3
  > test_check_hy_graph.R: found loop at 3
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |==========================================================            |  83%
  > test_check_hy_graph.R: found loop at 3
  > test_check_hy_graph.R: found loop at 3
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |===================================                                   |  50%
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |===================================                                   |  50%
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |=========                                                             |  13%
  > test_check_hy_graph.R: 
    |                                                                            
    |===================                                                   |  27%
  > test_check_hy_graph.R: 
    |                                                                            
    |============================                                          |  40%
    |                                                                            
    |======================================                                |  54%
  > test_check_hy_graph.R: 
    |                                                                            
    |===============================================                       |  67%
  > test_check_hy_graph.R: 
    |                                                                            
    |========================================================              |  80%
  > test_check_hy_graph.R: 
    |                                                                            
    |==================================================================    |  94%
  > test_check_hy_graph.R: 
    |                                                                            
    |======================================================================| 100%
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
  > test_check_hy_graph.R: 
    |                                                                            
    |=====                                                                 |   8%
  > test_check_hy_graph.R: 
    |                                                                            
    |===========                                                           |  15%
  > test_check_hy_graph.R: 
    |                                                                            
  > test_check_hy_graph.R: 
    |================                                                      |  23%
  > test_check_hy_graph.R: 
    |                                                                            
    |=====================                                                 |  30%
  > test_check_hy_graph.R: 
    |                                                                            
    |==========================                                            |  38%
  > test_check_hy_graph.R: 
    |                                                                            
    |================================                                      |  45%
  > test_check_hy_graph.R: 
    |                                                                            
    |=====================================                                 |  53%
  > test_check_hy_graph.R: 
    |                                                                            
    |==========================================                            |  60%
  > test_check_hy_graph.R: 
    |                                                                            
    |===============================================                       |  68%
  > test_check_hy_graph.R: 
    |                                                                            
    |=====================================================                 |  75%
  > test_check_hy_graph.R: 
    |                                                                            
    |==========================================================            |  83%
  > test_check_hy_graph.R: 
    |                                                                            
    |===============================================================       |  90%
  > test_check_hy_graph.R: 
    |                                                                            
    |===================================================================== |  98%
  > test_check_hy_graph.R: 
    |                                                                            
    |======================================================================| 100%
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
  > test_check_hy_graph.R: 
    |                                                                            
    |=========                                                             |  13%
  > test_check_hy_graph.R: 
    |                                                                            
    |==================                                                    |  26%
  > test_check_hy_graph.R: 
    |                                                                            
    |===========================                                           |  38%
  > test_check_hy_graph.R: 
    |                                                                            
    |====================================                                  |  51%
  > test_check_hy_graph.R: 
    |                                                                            
    |=============================================                         |  64%
  > test_check_hy_graph.R: 
    |                                                                            
    |======================================================                |  77%
  > test_check_hy_graph.R: 
    |                                                                            
    |===============================================================       |  90%
  > test_check_hy_graph.R: 
    |                                                                            
    |======================================================================| 100%
  > test_check_hy_graph.R: 
    |                                                                            
    |                                                                      |   0%
    |                                                                            
    |======================================================================| 100%
  Saving _problems/test_get_hydro_location-13.R
  > test_hydroloom.R: no hy class attribute
  > test_hydroloom.R: some na toids
  > test_hydroloom.R: no original names attribute
  > test_hydroloom.R: no hy class attribute
  Saving _problems/test_index-17.R
  Saving _problems/test_index-77.R
  Saving _problems/test_index-132.R
  Saving _problems/test_index-156.R
  Saving _problems/test_index-211.R
  Saving _problems/test_index-245.R
  Saving _problems/test_index-269.R
  [ FAIL 8 | WARN 4 | SKIP 1 | PASS 343 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test_add_levelpaths.R:158:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_get_hydro_location.R:13: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. ├─hydroloom::index_points_to_lines(sample_flines, points) at test_get_hydro_location.R:13:3
   2. └─hydroloom:::index_points_to_lines.data.frame(sample_flines, points)
   3.   ├─hydroloom::index_points_to_lines(...)
   4.   └─hydroloom:::index_points_to_lines.hy(...)
   5.     ├─dplyr::left_join(...)
   6.     └─hydroloom:::matcher_dt(x, points, search_radius, max_matches = max_matches)
   7.       ├─matched[, `:=`(N, seq_len(.N)), by = list(point_id)]
   8.       └─data.table:::`[.data.table`(...)
  ── Error ('test_index.R:16:3'): 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_index.R:16:3
    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. └─hydroloom::index_points_to_waterbodies(wb, gage_l)
    8.   └─hydroloom:::matcher_dt(waterbodies, st_coordinates(points), search_radius)
    9.     ├─matched[, `:=`(N, seq_len(.N)), by = list(point_id)]
   10.     └─data.table:::`[.data.table`(...)
  ── Error ('test_index.R:72:3'): point indexing to nearest existing node works as expected ──
  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_equal(...) at test_index.R:72:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─hydroloom::index_points_to_lines(flines_in, point)
    5. └─hydroloom:::index_points_to_lines.data.frame(flines_in, point)
    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:128:5'): point indexing works without measures ─────────
  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_equal(...) at test_index.R:128:5
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─hydroloom::index_points_to_lines(flines_in, point)
    5. └─hydroloom:::index_points_to_lines.data.frame(flines_in, point)
    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:147:3'): point indexing to for multiple points works ───
  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_equal(...) at test_index.R:147:3
    2. │ └─testthat::quasi_label(enquo(object), label)
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. ├─hydroloom::index_points_to_lines(flines_in, point, search_radius = sr)
    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:210: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:210:3
    2. │ └─base::withCallingHandlers(...)
    3. ├─hydroloom::index_points_to_lines(lines, points, search_radius = 500)
    4. └─hydroloom:::index_points_to_lines.data.frame(lines, points, search_radius = 500)
    5.   ├─hydroloom::index_points_to_lines(...)
    6.   └─hydroloom:::index_points_to_lines.hy(...)
    7.     ├─dplyr::left_join(...)
    8.     └─hydroloom:::matcher_dt(x, points, search_radius, max_matches = max_matches)
    9.       ├─matched[, `:=`(N, seq_len(.N)), by = list(point_id)]
   10.       └─data.table:::`[.data.table`(...)
  ── Error ('test_index.R:241:3'): no duplicates when using precision ────────────
  Error in ``[.data.table`(matched, , `:=`(N, seq_len(.N)), by = list(point_id))`: attempt access index 4/4 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─dplyr::filter(...) at test_index.R:241: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:266: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. ├─hydroloom::index_points_to_lines(...) at test_index.R:266:3
   2. └─hydroloom:::index_points_to_lines.data.frame(...)
   3.   ├─hydroloom::index_points_to_lines(...)
   4.   └─hydroloom:::index_points_to_lines.hy(...)
   5.     ├─dplyr::left_join(...)
   6.     └─hydroloom:::matcher_dt(x, points, search_radius, max_matches = max_matches)
   7.       ├─matched[, `:=`(N, seq_len(.N)), by = list(point_id)]
   8.       └─data.table:::`[.data.table`(...)
  
  [ FAIL 8 | WARN 4 | SKIP 1 | PASS 343 ]
  Error:
  ! Test failures.
  Execution halted