post.rpart: PostScript Presentation Plot of an Rpart Object
Generates a PostScript presentation plot of an
## S3 method for class 'rpart'
filename = (((tree)), ".ps", sep = ""),
digits = ("digits") - 2, = ,
use.n = , horizontal = , )
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
a title which appears at the top of the plot. By default, the
name of the
rpart endpoint is printed out.
ASCII file to contain the output. By default, the name of the file is
the name of the object given by
rpart (with the suffix
.ps added). If
filename = "", the plot appears on the current graphical device.
number of significant digits to include in numerical data.
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
TRUE) indicates the maximum possible abbreviation.
TRUE (default), adds to label
(\#events level1/ \#events level2/etc. for method
anova, and \#events/n for methods
TRUE (default), plot is horizontal. If
appears as landscape.
other arguments to the
The plot created uses the functions
fancy option). The settings were chosen because they looked
good to us, but other options may be better, depending on the
Users are encouraged to write their own function containing favorite
a plot of
rpart is created using the
postscript driver, or
the current device if
filename = "".
z.auto <- (Mileage ~ Weight, )
(z.auto, = "") # display tree on active device
# now construct postscript version on file "pretty.ps"
# with no title
(z.auto, = "pretty.ps", = " ")
z.hp <- (Mileage ~ Weight + HP, )