I'd like to create a bidimensional presentation of a classification tree built using the rpart() function. I've seen that a partition.tree() function exists for the tree() function. Does a similar function exist for the rpart() function? Thanks a lot Simone Vantini
Does something like partition.rpart() exist?
2 messages · Simone Vantini, Andy Bunn
I might well be wrong, but I don't think there is. I went about rewriting partition.tree for rpart once but stopped after I realized that it was much easier to add lines and segments to plots by hand using the coordinates from the rpart object (I then added a third predictor to my dataset making the whole process pointless anyways.) Looking at the code for partition.tree and its embedded function ptXlines gives you hints how to extract the relevant bits of the tree to add to a plot. I assume that you've seen this thread? http://www.r-project.org/nocvs/mail/r-help/2002/0142.html Sorry not to have been more help. -Andy
-----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Simone Vantini Sent: Wednesday, November 10, 2004 5:27 AM To: R-help at stat.math.ethz.ch Subject: [R] Does something like partition.rpart() exist? I'd like to create a bidimensional presentation of a classification tree built using the rpart() function. I've seen that a partition.tree() function exists for the tree() function. Does a similar function exist for the rpart() function? Thanks a lot Simone Vantini
______________________________________________ R-help at 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