Description Usage Arguments Details Author(s) References See Also Examples
This function plots a tree-based model, i.e. a rpart
object
1 2 3 | prettyTree(t, compress = F, branch = 0.2, margin = 0.1, uniform = T,
all = T, cex = 0.8, font = 10, use.n = T, fwidth = 0.5,
fheight = 0.45, center = 0, ...)
|
t |
A |
compress |
A boolean parameter passed to |
branch |
A numeric parameter passed to |
margin |
A numeric parameter passed to |
uniform |
A boolean parameter passed to |
all |
A boolean parameter passed to |
cex |
A number controling the character size. Defaults to 0.8. |
font |
A number setting the base font size in points. Defaults to 10. |
use.n |
A boolean parameter passed to |
fwidth |
A numeric parameter passed to |
fheight |
A numeric parameter passed to |
center |
A numeric parameter controlling drawing of ellipses. Defaults to 0. |
... |
Further parameters passed both to |
This function achieves the same functionallity as applying the
function plot()
and then the function text()
to a
rpart
object: it essentially obtains a graphical representation
of a tree-based model. The basic differences are related to visual
formatting of the trees.
Luis Torgo ltorgo@dcc.fc.up.pt
Therneau, T. M. and Atkinson, B.; port by Brian Ripley. (2010). rpart: Recursive Partitioning. R package version 3.1-46.
Torgo, L. (2010) Data Mining using R: learning with case studies, CRC Press (ISBN: 9781439810187).
http://www.dcc.fc.up.pt/~ltorgo/DataMiningWithR
plot.rpart
, text.rpart
,
rpartXse
, rpart
1 2 3 4 5 6 7 | data(iris)
tree <- rpartXse(Species ~ ., iris)
## Not run:
prettyTree(tree)
prettyTree(tree,all=F,use.n=F,branch=0)
## End(Not run)
|
Loading required package: lattice
Loading required package: grid
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.