search for: irisindex

Displaying 1 result from an estimated 1 matches for "irisindex".

Did you mean: ifi_index
2012 Dec 10
3
splitting dataset based on variable and re-combining
...tions and have the results be in the same order as my original dataset. To illustrate I will use iris: # Take Iris and create a dataframe of just two Species, setosa and versicolor, shuffle them data(iris) iris <- iris[(iris$Species=="setosa" | iris$Species=="versicolor"),] irisindex <- sample(1:nrow(iris), nrow(iris)) iris <- iris[irisindex,] # Make predictions on setosa using the mySetosaModel model, and on versicolor using the myVersicolorModel: predict(mySetosaModel, iris[iris$Species=="setosa",]) predict(myVersicolorModel, iris[iris$Species=="versico...