[R] how to use the rpart model to predict new data frame?

PO SU rhelpmaillist at 163.com
Wed Nov 12 04:47:34 CET 2014


Dear expeRts,
    Now i have a  train  dataset a  and  test dataset b , i  using the following codes:
rp<-rpart(y~.,data=a,method="class")
plot(rp)
text(rp)
but how can i use the trained model to predict b?
TKS.






--

PO SU
mail: desolator88 at 163.com 
Majored in Statistics from SJTU


More information about the R-help mailing list