Skip to content

Record repeats in group_vfold_cv() attributes - #617

Open
taekop wants to merge 1 commit into
tidymodels:mainfrom
taekop:fix-group-vfold-cv-repeats
Open

taekop wants to merge 1 commit into
tidymodels:mainfrom
taekop:fix-group-vfold-cv-repeats

Conversation

@taekop

@taekop taekop commented Sep 30, 2026

Copy link
Copy Markdown

group_vfold_cv() hardcoded repeats = 1 in the attributes of its result, so attr(x, "repeats") was wrong when repeats > 1. It now records the supplied value, as vfold_cv() does.

library(rsample)
attr(group_vfold_cv(mtcars, cyl, v = 2, repeats = 2), "repeats")
#> [1] 1   # before
#> [1] 2   # after

Closes #607

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repeats attribute is hardcoded to 1 for group_vfold_cv()

1 participant