[R] Re: your mail

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu Apr 18 17:34:05 CEST 2002


On Thu, 18 Apr 2002, Don Stierman wrote:

> I have created a tree and want to save some of the
> data so that I can create a html table from it.
> I would like to save the output from data.ltr (see
> example below) to a file, but haven't found a way to
> do that, keeping the nice format that typing data.ltr
> gives me (see output below). Is there a way to do
> this?

?sink.

>
> Example:
> library (maptree)
> library (tree)
> data<-read.csv("C:\\data.txt")
> cnames<-colnames(data)
> data$Vendor=as.factor(data$Vendor)
> data$Yield=as.numeric(data$Yield)
> data.ltr <- tree(Yield ~ ., data)
>
> Output:
> > data.ltr
> node), split, n, deviance, yval
>       * denotes terminal node
>
> 1) root 22 18.590 1.1360
>   2) X0100.WAFER.START.SCRIBE.PROD:
> 1TAGG3,1TAHK2,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA
> 17  3.059 0.7647
>     4) e.F: 0,2,5 6  1.333 0.3333 *
>     5) e.F: 1,3,4 11  0.000 1.0000 *
>   3) X0100.WAFER.START.SCRIBE.PROD: 1TAHL7,NA,NA,NA 5
> 5.200 2.4000 *
> >
>
>
> __________________________________________________
> Do You Yahoo!?
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list