Skip to content

Commit

Permalink
fix use id arg
Browse files Browse the repository at this point in the history
  • Loading branch information
robitalec committed Oct 3, 2024
1 parent 1864611 commit 83a7b75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/centroid_dyad.R
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,14 @@ centroid_dyad <- function(
m <- merge(edges,
DT[, .SD, .SDcols = c(coords, id, 'timegroup')],
by.x = c('ID1', timegroup),
by.y = c('ID', timegroup),
by.y = c(id, timegroup),
all.x = TRUE,
sort = FALSE)
data.table::setnames(m, coords, id1_coords)
m <- merge(m,
DT[, .SD, .SDcols = c(coords, id, 'timegroup')],
by.x = c('ID2', timegroup),
by.y = c('ID', timegroup),
by.y = c(id, timegroup),
all.x = TRUE,
sort = FALSE)
data.table::setnames(m, coords, id2_coords)
Expand Down

0 comments on commit 83a7b75

Please sign in to comment.