I can see the method 'createDataPartition' can split the data based in the outcome variable:
https://topepo.github.io/caret/data-splitting.html#outcome
This same applies on 'createFolds', I think.
But I'm trying to use stratified k-folding (The folds are made by preserving the percentage of samples for each class in target) when calling 'trainControl' with 'cv' method. I don't see a parameter to specify this. There is a possibility of giving the folds indexes as a parameter, but I suppose this shouldn't work with 'repeatedcv' (as, in each repeat, it needs/creates new folds)
Does it use stratified k-folding by default? What if I need shuffle, instead?
Thanks