diff --git a/NEWS.md b/NEWS.md index 06032088..6d799ad5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,10 @@ # rsample (development version) +## Bug fixes + +* `vfold_cv()` now utilizes the `breaks` argument correctly for repeated cross-validation (@ZWael, #471). + + # rsample 1.2.1 * `nested_cv()` no longer errors if `outside` is a long call (#459, #461). diff --git a/R/vfold.R b/R/vfold.R index 9c67ea4a..0fc99044 100644 --- a/R/vfold.R +++ b/R/vfold.R @@ -86,7 +86,7 @@ vfold_cv <- function(data, v = 10, repeats = 1, ) } for (i in 1:repeats) { - tmp <- vfold_splits(data = data, v = v, strata = strata, pool = pool) + tmp <- vfold_splits(data = data, v = v, strata = strata, breaks = breaks ,pool = pool) tmp$id2 <- tmp$id tmp$id <- names0(repeats, "Repeat")[i] split_objs <- if (i == 1) {