i want to make prediction of new data in Rpart ,,, from prp documentation i have read. The function maybe should like this
> rpart.predict(survived, newdata=ptitanic[1:3,], rules=TRUE)
died survived
1 0.27253 0.72747 because sex is female
2 0.11111 0.88889 because sex is male & age < 9.5 & sibsp < 3
3 0.27253 0.72747 because sex is female
but rpart.predict not found ,, can everyone tell's me the alternative ?
For future reference, it is easier for us to help you if you include a self-contained reproducible example (i.e. a reprex), that way, it's easy to see if the problem is coming from the fact that you don't have the correct libraries loaded.