- using R Under development (unstable) (2025-12-18 r89199)
- 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 ‘nhdplusTools/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘nhdplusTools’ version ‘1.4.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 ‘nhdplusTools’ 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 ... [2s/3s] OK
- checking whether the package can be loaded with stated dependencies ... [2s/2s] OK
- checking whether the package can be unloaded cleanly ... [2s/2s] OK
- checking whether the namespace can be loaded with stated dependencies ... [2s/3s] OK
- checking whether the namespace can be unloaded cleanly ... [2s/2s] OK
- checking loading without being on the library search path ... [2s/2s] OK
- checking whether startup messages can be suppressed ... [2s/2s] 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 ... [15s/18s] OK
- checking Rd files ... [0s/1s] 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 contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [0s/1s] OK
- checking LazyData ... OK
- checking data for ASCII and uncompressed saves ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [4s/6s] ERROR
Running examples in ‘nhdplusTools-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: disambiguate_flowline_indexes
> ### Title: Disambiguate Flowline Indexes
> ### Aliases: disambiguate_flowline_indexes
>
> ### ** Examples
>
> 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"))
>
> flowpath <- dplyr::select(sample_flines,
+ comid = COMID,
+ totda = TotDASqKM,
+ nameid = GNIS_NAME,
+ REACHCODE,
+ ToMeas,
+ FromMeas)
>
> indexes <- get_flowline_index(flowpath,
+ hydro_location,
+ search_radius = 0.2,
+ max_matches = 10)
Warning in check_search_radius(search_radius, points) :
search_radius units not set, trying units of points CRS.
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: get_flowline_index ... index_points_to_lines.hy -> left_join -> matcher_dt -> [ -> [.data.table
Execution halted
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [40s/24s] ERROR
Running ‘testthat.R’ [39s/24s]
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_bbox_nhdplus.R:5:3',
'test_00_plot_integration_nhdplus.R:6: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_get_path.R:69:3',
'test_run_plus_attributes.R:20: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
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [20s/30s] OK
- checking PDF version of manual ... [5s/8s] OK
- checking HTML version of manual ... [3s/6s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 2 ERRORs