data(iris)
#shuffle the vector
iris <- iris[sample(1:nrow(iris),length(1:nrow(iris))),1:ncol(iris)]
irisValues <- iris[,1:4]
irisTargets <- decodeClassLabels(iris[,5])
splitForTrainingAndTest(irisValues, irisTargets, ratio=0.15)
Run the code above in your browser using DataLab