Re: [R] predict.rpart help

2011-03-24 Thread Terry Therneau
Make your own copy of predict.rpart: mypredict <- rpart:::predict.rpart (Even better to grab the source code version, then you can start with a copy that has comments in it!) Edit it to add type='where': about 1/3 of the way down you will see that the routine has computed a variable "where"; th

[R] predict.rpart help

2011-03-23 Thread Osei Poku
Hi Everyone, Is there a way to get predict.rpart() to return the nodes reached by the new examples in addition to the predicted probabilities it already returns? In other words, I would like to know the leaf node in the tree object that each new example data drops down to. Thanks in advance fo

[R] predict.rpart help

2011-03-23 Thread Osei Poku
Hi Everyone, Is there a way to get predict.rpart() to return the nodes reached by the new examples in addition to the predicted probabilities it already returns? In other words, I would like to know the leaf node in the tree object that each new example data drops down to. Thanks in advance fo