\HeaderA{print.rpart}{Print an Rpart Object}{print.rpart}
\keyword{tree}{print.rpart}
\begin{Description}\relax
This function prints an \code{rpart} object.  It is a method for the generic 
function \code{print} of class \code{rpart}.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'rpart':
print(x, minlength=0, spaces=2, cp, digits= getOption("digits"), ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] fitted model object of class \code{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 \code{rpart} function. 

\item[\code{minlength}] Controls the abbreviation of labels: see \code{\LinkA{labels.rpart}{labels.rpart}}.

\item[\code{spaces}] the number of spaces to indent nodes of increasing depth. 

\item[\code{digits}] the number of digits of numbers to print. 

\item[\code{cp}] prune all nodes with a complexity less than \code{cp} from the
printout. Ignored if unspecified.

\item[\code{...}] arguments to be passed to or from other methods.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function is a method for the generic function \code{print} for class 
\code{"rpart"}.  It can be invoked by calling print for an object of the 
appropriate class, or directly by calling \code{print.rpart} regardless of 
the class of the object.
\end{Details}
\begin{Section}{Side Effects}
A semi-graphical layout of the contents of \code{x\$frame} is
printed.  Indentation is used to convey the tree topology.
Information for each node includes the node number, split, size,
deviance, and fitted value.  For the \code{"class"} method, the
class probabilities are also printed.
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{print}{print}},  \code{\LinkA{rpart.object}{rpart.object}},
\code{\LinkA{summary.rpart}{summary.rpart}},  \code{\LinkA{printcp}{printcp}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
z.auto <- rpart(Mileage ~ Weight, car.test.frame)
z.auto
## Not run: node), split, n, deviance, yval
      * denotes terminal node

 1) root 60 1354.58300 24.58333  
   2) Weight>=2567.5 45  361.20000 22.46667  
     4) Weight>=3087.5 22   61.31818 20.40909 *
     5) Weight<3087.5 23  117.65220 24.43478  
      10) Weight>=2747.5 15   60.40000 23.80000 *
      11) Weight<2747.5 8   39.87500 25.62500 *
   3) Weight<2567.5 15  186.93330 30.93333 *
## End(Not run)\end{ExampleCode}
\end{Examples}

