post.tree(tree, title=deparse(substitute(tree)), file=paste(title, ".ps", sep = ""), digits=.Options$digits - 3, pretty=0, pointsize=12)
tree
.
This is assumed to be the result of some function that produces
an object with the same named
components as that returned by the
tree
function.
NULL
signifies using elements of
letters
to represent the different factor levels.
tree
with the suffix
.ps
appended to it.
cex
is 1,
the text will appear in this size.
tree
in the
PostScript page description language is put in the current working directory.
The plot is different from the dendrogram produced by
plot
and is intended for presentation.
The edges connecting uniformly spaced nodes are labeled
by left and right splits.
Nodes are represented by ellipses (interior nodes) and rectangles (leaves)
and labeled by
yval
.
Under each node, either the within-node deviance is printed (regression trees)
or the misclassification error rate (classification trees).
The function is independent of the current graphics device.
It creates a file which can be sent directly to a PostScript printer.
z.auto <- tree(Mileage ~ Weight, car.test.frame) plot(z.auto) # display tree on active device # Now construct postscript version on file "pretty" post.tree(z.auto, file="pretty") z.hp <- tree(Mileage ~ Weight + HP, car.test.frame) post.tree(z.hp) files.in.dir(".") # Should include the following new files: pretty, z.hp.ps #endif /*) windows */