Learn R Programming

traineR (version 2.2.11)

predict.rpart.prmdt: predict.rpart.prmdt

Description

Return prediction for a rpart model.

Usage

# S3 method for rpart.prmdt
predict(object, newdata, type = "class", na.action = na.pass, ...)

Value

a vector or matrix of predictions for rpart model.

Arguments

object

a rpart model object for which prediction is desired.

newdata

an optional data frame in which to look for variables with which to predict.

type

type of prediction 'prob' or 'class' (default).

na.action

a function to determine what should be done with missing values in newdata. The default is to pass them down the tree using surrogates in the way selected when the model was built. Other possibilities are na.omit and na.fail.

...

additional arguments affecting the predictions produced.