I need to extract the path and probability of each leaf in a decision tree. Here's a quick sample to work with:
data(iris)
model<-rpart(Species~., data=iris)
summary(model)

I'd like to be able to extract all of that information in summary here such as "predicted class" , "class counts" and "probabilities" in a format that I can put into a table rather than just being able to read it on the console.
Much thanks!
unclass(model)has a lot of stuff that might be useful. It looks like if you pick out what you want, tableing it might not be too bad - Rich Scriven