From 09239e44d04cd52f5fde61019133994dcffbd8c7 Mon Sep 17 00:00:00 2001 From: prockenschaub Date: Fri, 15 Mar 2024 16:30:34 +0100 Subject: [PATCH] fix bug in trunc_time that prevents truncation --- R/utils-ts.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/utils-ts.R b/R/utils-ts.R index 74afa62a..b9b1fa7d 100644 --- a/R/utils-ts.R +++ b/R/utils-ts.R @@ -643,11 +643,11 @@ padded_capped_diff <- function(x, final, max) { trunc_time <- function(x, min, max) { if (not_null(min)) { - replace(x, x < min, min) + x <- replace(x, x < min, min) } if (not_null(max)) { - replace(x, x > max, max) + x <- replace(x, x > max, max) } x