View source: R/rpart.predict.R
rpart.predict | R Documentation |
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
.
predict.rpart
rpart.rules
data(ptitanic) model <- rpart(survived ~ ., data = ptitanic, cp = .02) head(rpart.predict(model, rules=TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.