library(rpart) cart=rpart(Species ~., data=iris, method="class") plot(cart) text(cart, use.n=FALSE, pretty=0)