Re: [R] rpart$where and predict.rpart

2008-07-22 Thread Chua Siang Li
s prohibited. ----- Original Message ---- From: "Prof Brian Ripley" <[EMAIL PROTECTED]> To: "Chua Siang Li" <[EMAIL PROTECTED]> Cc: r-help@r-project.org Subject: Re: [R] rpart$where and predict.rpart Date: 07/22/08 18:51 On Tue, 22 Jul 2008,

Re: [R] rpart$where and predict.rpart

2008-07-22 Thread Prof Brian Ripley
On Tue, 22 Jul 2008, Chua Siang Li wrote: 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

[R] rpart$where and predict.rpart

2008-07-22 Thread Chua Siang Li
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