Skip to content

Commit

Permalink
replace igraph clusters with components
Browse files Browse the repository at this point in the history
  • Loading branch information
robitalec committed Apr 14, 2024
1 parent 2edd03c commit a8638fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/group_pts.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ group_pts <- function(DT = NULL,
method = 'euclidean'))
graphAdj <-
igraph::graph_from_adjacency_matrix(distMatrix <= threshold)
igraph::clusters(graphAdj)$membership
igraph::components(graphAdj)$membership
},
by = c(splitBy, timegroup), .SDcols = c(coords, id)]
DT[, group := .GRP,
Expand Down

0 comments on commit a8638fe

Please sign in to comment.