Extended version of predict.rpart
Identical to predict.rpart but
optionally show the node numbers and rules for the predicted values.
rpart.predict(object, newdata,
type = c("vector", "prob", "class", "matrix"),
na.action = na.pass,
nn=FALSE, rules=FALSE, ...)object, newdata, type, na.action |
Identical to the same arguments for |
nn |
If |
rules |
If |
... |
Passed on to |
Same as predict.rpart,
but with additional information if nn=TRUE and/or rules=TRUE.
data(ptitanic) model <- rpart(survived ~ ., data = ptitanic, cp = .02) head(rpart.predict(model, rules=TRUE))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.