\HeaderA{rpart2gNEL}{rpart to graphNEL Converter}{rpart2gNEL}
\aliasA{grabSplitV}{rpart2gNEL}{grabSplitV}
\aliasA{remapAff}{rpart2gNEL}{remapAff}
\keyword{models}{rpart2gNEL}
\begin{Description}\relax
Creates an object of class \code{graphNEL} from one of class \code{rpart}.
\end{Description}
\begin{Usage}
\begin{verbatim}
rpart2gNEL(tr, remap=function(x) x, nsep="\n")
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{tr}] instance of \code{rpart} class from \code{\LinkA{rpart}{rpart}} package.
\item[\code{remap}] function that maps node names in tree to node names in graph.
\item[\code{nsep}] token that separates node name and vote tally in the rendering.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Not explicitly used in the book, but the basis for a certain graph
illustrating application of rpart.  The newer coin/party packages
have more interesting rendering approaches based on graphviz.

\code{grabSplitV} is a utility function for acquiring the variable
names, \code{remapAff} will remap affymetrix probe names to gene
symbols for use in the \code{remap} parameter.
\end{Details}
\begin{Value}
a \code{\LinkA{graphNEL-class}{graphNEL.Rdash.class}} instance with nodes
constructed to convey information on the data tree fit
\end{Value}
\begin{Author}\relax
Vince Carey <stvjc@channing.harvard.edu>
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{rpart}{rpart}}, \code{\LinkA{graphNEL-class}{graphNEL.Rdash.class}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
library(rpart)
example(rpart)
ff = rpart2gNEL(fit2)
ff
nodes(ff)
\end{ExampleCode}
\end{Examples}

