labels.rpart {rpart} | R Documentation |
Create split labels for an rpart
object.
labels.rpart(object, pretty = TRUE, collapse = TRUE)
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 factor levels. The
default (TRUE) indicates the maximum possible abbreviation.
|
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.
|
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.