Skip to content

Commit 2ebf417

Browse files
committed
avoid deprecation warning
1 parent b034aa6 commit 2ebf417

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/internal_calibration_split.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,11 @@ internal_calibration_split.initial_time_split <- function(x, split_args, ...) {
669669

670670
training_set <- training(x)
671671

672+
# to avoid deprecation warning if lag is just the default of 0
673+
if (-1 < split_args$lag && split_args$lag < 1) {
674+
split_args$lag <- NULL
675+
}
676+
672677
split_cal <- internal_calibration_split_core(
673678
training_set,
674679
split_function = initial_time_split,

0 commit comments

Comments
 (0)