Taken from caret package, used to create folds
createFolds(y, k = 10, list = TRUE, returnTrain = FALSE)
y
target variable
k
number of folds
null