- using R Under development (unstable) (2025-12-22 r89219)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-15 (Debian 15.2.0-11) 15.2.0
GNU Fortran (Debian 15.2.0-11) 15.2.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘hydroloom/DESCRIPTION’ ... OK
- this is package ‘hydroloom’ version ‘1.1.1’
- package encoding: UTF-8
- checking CRAN incoming feasibility ... [2s/2s] OK
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘hydroloom’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [1s/3s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/2s] OK
- checking whether the package can be unloaded cleanly ... [1s/2s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/2s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/2s] OK
- checking loading without being on the library search path ... [2s/3s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [12s/15s] OK
- checking Rd files ... [0s/0s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [9s/12s] ERROR
Running examples in ‘hydroloom-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: disambiguate_indexes
> ### Title: Disambiguate Flowline Indexes
> ### Aliases: disambiguate_indexes
>
> ### ** Examples
>
> if(require(nhdplusTools)) {
+ source(system.file("extdata", "sample_flines.R", package = "nhdplusTools"))
+
+ hydro_location <- sf::st_sf(id = c(1, 2, 3),
+ geom = sf::st_sfc(list(sf::st_point(c(-76.86934, 39.49328)),
+ sf::st_point(c(-76.91711, 39.40884)),
+ sf::st_point(c(-76.88081, 39.36354))),
+ crs = 4326),
+ totda = c(23.6, 7.3, 427.9),
+ nameid = c("Patapsco", "", "Falls Run River"))
+
+ indexes <- index_points_to_lines(sample_flines,
+ hydro_location,
+ search_radius = units::set_units(0.2, "degrees"),
+ max_matches = 10)
+
+ disambiguate_indexes(indexes,
+ dplyr::select(sample_flines, COMID, TotDASqKM),
+ dplyr::select(hydro_location, id, totda))
+
+ result <- disambiguate_indexes(indexes,
+ dplyr::select(sample_flines, COMID, GNIS_NAME),
+ dplyr::select(hydro_location, id, nameid))
+
+ result[result$point_id == 1, ]
+
+ result[result$point_id == 2, ]
+
+ result[result$point_id == 3, ]
+ }
Loading required package: nhdplusTools
Attaching package: ‘nhdplusTools’
The following object is masked from ‘package:hydroloom’:
make_node_topology
Warning in index_points_to_lines.hy(x, points, search_radius = search_radius, :
converting to LINESTRING, this may be slow, check results
Error in `[.data.table`(matched, , `:=`(N, seq_len(.N)), by = list(point_id)) :
attempt access index 4/4 in VECTOR_ELT
Calls: index_points_to_lines ... index_points_to_lines.hy -> left_join -> matcher_dt -> [ -> [.data.table
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [51s/28s] ERROR
Running ‘testthat.R’ [51s/28s]
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:
|
> test_check_hy_graph.R:
| | 0%
|
|======================================================================| 100%
> test_check_hy_graph.R:
|
| | 0%
> test_check_hy_graph.R:
|
|========= | 13%
> test_check_hy_graph.R:
|
|=================== | 27%
> test_check_hy_graph.R:
|
|============================ | 40%
> test_check_hy_graph.R:
|
|====================================== | 54%
> test_check_hy_graph.R:
|
|=============================================== | 67%
|
|======================================================== | 80%
|
|================================================================== | 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:
|
|================ | 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:
|
> 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%
|
|======================================================================| 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:
|
> test_check_hy_graph.R:
|====================================================== | 77%
> test_check_hy_graph.R:
|
|=============================================================== | 90%
> test_check_hy_graph.R:
|
> 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
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [21s/27s] OK
- checking PDF version of manual ... [4s/6s] OK
- checking HTML version of manual ... [2s/3s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs