From 009801059e1e3990c9417206ec31b54328fa529c Mon Sep 17 00:00:00 2001 From: Andrew Gene Brown Date: Fri, 11 Oct 2024 09:15:12 -0700 Subject: [PATCH] add comment about when aggregation is used --- R/collapseHz.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/collapseHz.R b/R/collapseHz.R index ec470ef0..b08fb1ff 100644 --- a/R/collapseHz.R +++ b/R/collapseHz.R @@ -178,6 +178,7 @@ collapseHz <- function(x, r <- rle(l) } + # only apply aggregation if there are adjacent horizons that match the target criteria if (any(r$lengths > 1)) { g <- unlist(lapply(seq_along(r$lengths), function(i) rep(i, r$lengths[i]))) hidx <- unlist(lapply(seq_along(r$lengths), function(i) if (r$lengths[i] == 1) TRUE else rep(FALSE, r$lengths[i]))) & l