labels.rpart {rpart} | R Documentation |
Create Split Labels For an Rpart Object
Description
This function provides labels for the branches of an rpart
tree.
Usage
## S3 method for class 'rpart'
labels(object, digits = 4, minlength = 1L, pretty, collapse = TRUE, ...)
Arguments
object |
fitted model object of class |
digits |
the number of digits to be used for numeric values.
All of the |
minlength |
the minimum length for abbreviation of character or factor variables.
If |
pretty |
an argument included for compatibility with the original Splus tree package:
|
collapse |
logical. The returned set of labels is always of the same length as the number of nodes in the tree. If If |
... |
optional arguments to |
Value
Vector of split labels (collapse = TRUE
) 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.