[R] Help oo sink

Winfried Theis theis at statistik.uni-dortmund.de
Wed Oct 18 15:00:54 CEST 2000


Dear Pan Yuming,

try something along the lines

[Just the significant lines]
> iris.tr <- tree(Species~ . ,learn)
> sink("test123.txt", append = TRUE)
> pred.iris<-predict(iris.tr, test)
> print(pred.iris) #this forces a print which is piped by sink to the named
                #file 
> sink()

I'm sure there are more elegant ways, but this one worked for me pretty well.

(To all the experts: Am I right to think that this behaviour is due to the fact
that in interactive work on the console the default ist stdout but this is not
the case when R is run as a batch job?)

Regards, Winfried
----------------------------------
E-Mail: Winfried Theis <theis at statistik.uni-dortmund.de>
Date: 18-Oct-00
Time: 14:51:30
Dipl.-Math. Winfried Theis, Fachbereich Statistik, Graduiertenkolleg
"Angewandte Statistik"
Universität Dortmund, 44221 Dortmund
Tel.: +49-231-755-5903  FAX: +49-231-755-4387
----------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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