Given an rsplit object, complement will determine which of the data rows are contained in the assessment set. To save space, many of the rset objects will not contain indices for the assessment split.

complement(x, ...)

Arguments

x

An rsplit object

...

Not currently used

Value

A integer vector.

See also

Examples

set.seed(28432) fold_rs <- vfold_cv(mtcars) head(fold_rs$splits[[1]]$in_id)
#> [1] 2 3 4 5 6 7
fold_rs$splits[[1]]$out_id
#> [1] NA
complement(fold_rs$splits[[1]])
#> [1] 1 9 25 27