Create partitions of data for cross-validation.

split2(x, n)

Arguments

x

Vector.

n

Integer.

Value

A partition of index vector x to n folds.