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
Examples with CPU (user + system) or elapsed time > 5s
                user system elapsed
add_levelpaths 3.707  0.047   5.236