Re: [R] Working with createFolds

2013-04-07 Thread Rui Barradas
Hello, You should say from what package are the functions you're using. From the help page of createFolds, the return value is "A list or matrix of row position integers corresponding to the training data" So to subset use `[` or `[[`. Try class(folds$index$Fold_i) If it's a numeric vector,

Re: [R] Working with createFolds

2013-04-07 Thread Nicolás Sánchez
Anyone? ;-) 2013/4/7 Nicolás Sánchez > Hello! > > I have a question. I am working with createFolds: > > folds<- trainControl(method='cv', index=createFolds(data$Score,list = > TRUE)) > > I need to iterate over folds to extract the indexes from each fold. > > For example, if I do folds$index$Fo

[R] Working with createFolds

2013-04-07 Thread Nicolás Sánchez
Hello! I have a question. I am working with createFolds: folds<- trainControl(method='cv', index=createFolds(data$Score,list = TRUE)) I need to iterate over folds to extract the indexes from each fold. For example, if I do folds$index$Fold01, it contains: 5 11 17 29 44 50 52 64 65 I nee