[R] Help oo sink
Pan_Yuming@aam.de
Pan_Yuming at aam.de
Wed Oct 18 12:59:17 CEST 2000
---------------------- Forwarded by Pan Yuming/Extern/AAM on 18.10.2000
12:58 ---------------------------
Pan Yuming
18.10.2000 11:41
To: Prof Brian Ripley <ripley at stats.ox.ac.uk>
cc:
Subject: Help oo sink (Document link: Pan Yuming)
Dear professor,
continue with the example i used, i want to save the prediction results but when i run a R file containing the following code, it just created an
empty file. but when i type the cmd
line by line in R, it worked. can you help on this?
Thanks very much for your kind help.
Pan yuming
library(tree)
data(iris)
attach(iris)
nobs <- nrow(iris)
N <- 1
#while (N + 99 < nobs) {
learn <- iris[N:(N+99),]
test <- iris[N + 100,]
iris.tr <- tree(Species~ . ,learn)
sink("test123.txt", append = TRUE)
predict(iris.tr, test)
sink()
#N<-N+1
#}
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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