caret包中有createFolds函数,如 >folds<-createFolds(y=training$y,k=10) 这里参数y是训练数据集label,k是几折交叉验证 我们可以看看这里输出是什么 >folds