Learn R Programming

rpart (version 3.1-9)

rpart.class: Set up for `class' Method for an Rpart Model

Description

Set up for the class method for an rpart model.

Usage

rpart.class(y, offset, parms, wt)

Arguments

y
the responses.
offset
NULL: anything else is an error.
parms
a named list of parameters.
wt
case weights.

Value

  • Returns a list consisting of
  • yy as factor codes,
  • parmsa named list of parameters. This will have components prior, loss and split (and more if supplied).
  • numrespthe number of responses (one plus the number of classes).
  • countsa vector of counts for each class.
  • ylevelsthe response levels corresponding to the codes given in y.
  • summarya function to be invoked by summary.rpart,
  • texta function to be invoked by text.rpart.

Details

rpart.class is used only by the function rpart. It validates the input parameter list: if that is missing or NULL default values are supplied.

See Also

rpart