On this page
text.rpart Place Text on a Dendrogram Plot
Description
Labels the current plot of the tree dendrogram with text.
Usage
## S3 method for class 'rpart'
text(x, splits = TRUE, label, FUN = text, all = FALSE,
pretty = NULL, digits = getOption("digits") - 3, use.n = FALSE,
fancy = FALSE, fwidth = 0.8, fheight = 0.8, bg = par("bg"),
minlength = 1L, ...)
Arguments
x |
fitted model object of class |
splits |
logical flag. If |
label |
For compatibility with |
FUN |
the name of a labeling function, e.g. |
all |
Logical. If |
minlength |
the length to use for factor labels. A value of 1 causes them to be printed as ‘a’, ‘b’, ..... Larger values use abbreviations of the label names. See the |
pretty |
an alternative to the |
digits |
number of significant digits to include in numerical labels. |
use.n |
Logical. If |
fancy |
Logical. If |
fwidth |
Relates to option |
fheight |
Relates to option |
bg |
The color used to paint the background to annotations if |
... |
Graphical parameters may also be supplied as arguments to this function (see |
Side Effects
the current plot of a tree dendrogram is labeled.
See Also
text, plot.rpart, rpart, labels.rpart, abbreviate
Examples
freen.tr <- rpart(y ~ ., freeny)
par(xpd = TRUE)
plot(freen.tr)
text(freen.tr, use.n = TRUE, all = TRUE)
Copyright (©) 1999–2012 R Foundation for Statistical Computing.
Licensed under the GNU General Public License.