Learn R Programming

rpart (version 2.0-3)

labels.rpart: Create Split Labels For an Rpart Object

Description

Create split labels for an rpart object.

Usage

labels.rpart(object, pretty = TRUE, collapse = TRUE)

Arguments

object
fitted model object of class rpart. This is assumed to be the result of some function that produces an object with the same named components as that returned by the rpart function.
pretty
an integer denoting the extent to which factor levels will be abbreviated in the character strings defining the splits; (0) signifies no abbreviation of levels. A NULL signifies using elements of letters to represent the different fact
collapse
logical. If TRUE (default), the returned value is a vector of labels for each node, otherwise a matrix of left and right split labels is returned.

Value

  • Vector of split labels (collapse=RUET) or matrix of left and right splits (collapse=FALSE) for the supplied rpart object. This function is called by printing methods for rpart and is not intended to be called directly by the users.

See Also

abbreviate