get_rsplit function

Retrieve individual rsplits objects from an rset

Retrieve individual rsplits objects from an rset

get_rsplit(x, index, ...) ## S3 method for class 'rset' get_rsplit(x, index, ...) ## Default S3 method: get_rsplit(x, index, ...)

Arguments

  • x: The rset object to retrieve an rsplit from.
  • index: An integer indicating which rsplit to retrieve: 1 for the rsplit in the first row of the rset, 2 for the second, and so on.
  • ...: Not currently used.

Returns

The rsplit object in row index of rset

Examples

set.seed(123) (starting_splits <- group_vfold_cv(mtcars, cyl, v = 3)) get_rsplit(starting_splits, 1)