Learn R Programming

rsample (version 1.2.1)

get_rsplit: Retrieve individual rsplits objects from an rset

Description

Retrieve individual rsplits objects from an rset

Usage

get_rsplit(x, index, ...)

# S3 method for rset get_rsplit(x, index, ...)

# S3 method for default get_rsplit(x, index, ...)

Value

The rsplit object in row index of rset

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.

Examples

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

Run the code above in your browser using DataLab