From a023abb847defdc0cbaab1d0f3d0b7b12db2706c Mon Sep 17 00:00:00 2001 From: Andrew Gene Brown Date: Thu, 5 Dec 2024 07:46:03 -0800 Subject: [PATCH] fix for #320 --- R/segment.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/segment.R b/R/segment.R index dde1aefd..badcadd2 100644 --- a/R/segment.R +++ b/R/segment.R @@ -188,7 +188,7 @@ hz_segment <- function(object, intervals, trim = TRUE, depthcols = c("top", "bot h <- h[order(h$idcol, h[[depthcols[1]]]), ] # merge to re-add spc with NA - h_orig <- data.frame(idcol = names(table(horizons(object)[idcol])), stringsAsFactors = FALSE) + h_orig <- data.frame(idcol = names(table(.data.frame.j(horizons(object), idcol, use_class = aqp_df_class(object)))), stringsAsFactors = FALSE) h <- merge(h_orig, h, by = "idcol", all.x = TRUE, sort = FALSE) rm(h_orig)