Could anyone please explain to me why the following writes nothing into
"all.Rout"
file? If the "for" loop is removed, t.test output can be written into
"all.out".
Thanks in advance.
Minghua Yao
..
zz <- file("all.Rout", open="wt")
sink(zz)
for(i in 1:n)
{
Cy3<-X[,2
Dear Minghua Yao,
If you throw in a print() or two you'll get some output in
your file. You could try print(t.test(Cy3, Cy5)) or whatever
you actually want.
Regards,
Andrew C. Ward
CAPE Centre
Department of Chemical Engineering
The University of Queensland
Brisbane Qld 4072 Australia
[EMAIL PR
Autoprinting does not work inside a for() {} loop, and you did not print
anything.
Try
for(i in 1:10) {i}
Did you try your problem without sink()?
On Tue, 16 Sep 2003, Yao, Minghua wrote:
>
> Could anyone please explain to me why the following writes nothing into
> "all.Rout"
> file? If the
ptember 16, 2003 11:35 AM
To: Yao, Minghua
Cc: R Help (E-mail)
Subject: Re: [R] Question in Using sink function
Autoprinting does not work inside a for() {} loop, and you did not print
anything.
Try
for(i in 1:10) {i}
Did you try your problem without sink()?
On Tue, 16 Sep 2003, Yao, Min
On Tue, 16 Sep 2003, Yao, Minghua wrote:
>
> Thanks, Prof. Ripley.
>
> Right. I saw nothing, either, when I tried without "for" loop.
> Does anywhere in the documents mention that Autoprinting does not work
> inside a for() {} loop?
It is in `An Introduction to R', albeit in a rather sophistica
On Tue, 16 Sep 2003, Yao, Minghua wrote:
>
> Thanks, Prof. Ripley.
>
> Right. I saw nothing, either, when I tried without "for" loop.
> Does anywhere in the documents mention that Autoprinting does not work
> inside a for() {} loop?
>
It's a FAQ.
-thomas