From 6c790173dea69c9fbf29431bc009ec295b05542c Mon Sep 17 00:00:00 2001 From: "Alec L. Robitaille" Date: Thu, 19 Sep 2024 16:39:18 -0300 Subject: [PATCH] rm looking forward correct --- R/fusion_id.R | 8 -------- 1 file changed, 8 deletions(-) diff --git a/R/fusion_id.R b/R/fusion_id.R index b2b86d96..11151e02 100644 --- a/R/fusion_id.R +++ b/R/fusion_id.R @@ -160,14 +160,6 @@ fusion_id <- function(edges = NULL, both_rleid := (both_rleid + seq.int(.N)) * -1, by = dyadID] - # Correct if (looking forward) the loc is part of a new fusion run - unique_edges[, both_rleid := data.table::fifelse( - timegroup - data.table::shift(timegroup, -1) == -1 & - within & !(tg_diff), - data.table::shift(both_rleid, -1), - both_rleid - ), by = dyadID] - # If n minimum length > 0, check nrows and return NA if less than min if (n_min_length > 0) { unique_edges[!is.na(both_rleid), both_rleid := data.table::fifelse(