Build a k-fold cross validation sample where training sets are the same size as the original data, and built by sampling disjoint from test/application sets (sampled with replacement).

kWayStratifiedYReplace(nRows, nSplits, dframe, y)

## Arguments

nRows number of rows to split (>1) number of groups to split into (1). original data frame (ignored). numeric outcome variable try to have equidistributed in each split.

split plan

## Examples


set.seed(23255)
d <- data.frame(y=sin(1:100))
pStrat <- kWayStratifiedYReplace(nrow(d),5,d,d\$y)