[R] Question in Using sink function

Andrew C. Ward s195404 at student.uq.edu.au
Tue Sep 16 18:27:29 CEST 2003


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
andreww at cheque.uq.edu.au


Quoting "Yao, Minghua" <yao6889 at msmailhub.oulan.ou.edu>:

> 
> 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*i-1];
>     Cy5<-X[,2*i];
> 	
>     t.test(Cy3, Cy5)
>   }
> 
> 
>   sink()
>   close(zz)
> ......
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>




More information about the R-help mailing list