[R] How to show which variables include in plot of classification tree

From: Muhammad Subianto <subianto_at_cs.uu.nl>
Date: Sat 19 Mar 2005 - 04:51:37 EST


Dear all
For my research, I am learning classification now. I was trying some example about classification tree pakages, such as tree and rpart, for instance,
in Pima.te dataset have 8 variables (include class=type):

library(rpart)
library(datasets)
pima.rpart <- rpart(type ~ npreg+glu+bp+skin+bmi+ped+age,data=Pima.te, method='class')
plot(pima.rpart, uniform=TRUE)
text(pima.rpart)
summary(pima.rpart)

In the result I found only 5 variables: npreg, glu, bmi, ped, and age were showing in the plot.
Now, I have 50 variables in my dataset. The result my classification tree very difficult to know which
variables showing in the plot. Are there any trick which variables are showing in plot.

Thanks for your help.
Muhammad Subianto



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Mar 19 04:59:00 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:51 EST