[R] Rpart decision tree

tudor tudor_bodea at hotmail.com
Fri Apr 8 13:03:08 CEST 2011


Dear useRs:

I try to plot an rpart object but cannot get a nice tree structure plot.  I
am using plot.rpart and text.rpart (please see below) but the branches that
connect the nodes overlap the text in the ellipses and rectangles.  Is there
a way to get a clean nice tree plot (as in the Rpart Mayo report)?  I work
under Windows and use R2.11.1 with rpart version 3.1-46.

Thank you.

Tudor

...
plot(cart, uniform=TRUE, branch=0.25, compress=TRUE, margin=0.25)
text(cart, use.n=TRUE, all=TRUE, fancy=TRUE, fheight=0.95)
...


--
View this message in context: http://r.789695.n4.nabble.com/Rpart-decision-tree-tp3435888p3435888.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list