[R] createDataPartition

2010-09-09 Thread Trafim Vanishek
Dear all, does anyone know how to define the structure of the required samples using function createDataPartition, meaning proportions of different types of variable in the partition? Smth like this for iris data: createDataPartition(y = c(setosa = .5, virginica = .3, versicolor = .2), times =

Re: [R] createDataPartition

2010-09-09 Thread Max Kuhn
Trafim, You'll get more answers if you adhere to the posting guide and tell us you version information and other necessary details. For example, this function is in the caret package (but nobody but me probably knows that =]). The first argument should be a vector of outcome values (not the