[R] rpart$where and predict.rpart

From: Chua Siang Li <siang.li.chua_at_acceval-intl.com>
Date: Tue, 22 Jul 2008 17:44:58 +0800

   Hello there. I have fitted a rpart model.
> rpartModel <- rpart(y~., data=data.frame(y=y,x=x),method="class", ....)
   and can use rpart$where to find out the terminal nodes that each    observations belongs.
   Now, I have a set of new data and used predict.rpart which seems to give    only the predicted value with no information similar to rpart$where.    May I know how to find out the terminal nodes that each new observations    belongs to?
   Many thanks.

   Chua Siang Li
   Consultant - Operations Research
   Acceval Pte Ltd
   Tel: 6297 8740
   Email: siang.li.chua_at_acceval-intl.com    Website: www.acceval-intl.com
   This message and any attachments (the "message"...{{dropped:12}}

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 22 Jul 2008 - 09:53:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 23 Jul 2008 - 04:32:33 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive