[R] sweave and post "rpart"

Christian Schulz ozric at web.de
Sat Aug 21 11:04:26 CEST 2004


Hi,

have anybody positive experience how 
it is possible get the post output from a
rpart-object in a large sweave file or is only the 
less nicely plot function instead of post possible???

\begin{figure}[htbp]
  \begin{center}
<<fig=true,eps=T>>=
post(dtreeEB, title="Tree",digits=getOption("digits") - 0,use.n=TRUE)
@
    \caption{Tree1}
  \end{center}
\end{figure}


(1) if the rpart object result contain only the root node, i get this
error:
Error:  chunk 21 
Error in if (is.leaf[lson]) left <- list(left = x[lson], right = x[lson],  : 
	missing value where TRUE/FALSE needed

(2) if the rpart object contains further nodes sweave finished fine, but 
the plot-part contains no tree and "corupted" the tex-document, so
a tex2pdf isn't possible.

Many Thanks,
Christian




More information about the R-help mailing list