Tony Dell <[EMAIL PROTECTED]> [Thu, May 01, 2008 at 04:32:23AM CEST]:
> hi all,
> 
> i wanted to use the sink function to sequentially output regression
> summaries within a for-loop. i must have something wrong somewhere (or be
> using the sink function incorrectly), but can anyone help?
> 
> the code I am using is:
> 

Please use code and data which is reproducible for us. As we don't have
access to your data, we'd have to construct some of our own.

This code, however, has the same effect:

for (i in 1:100) {
    sink("./sometext.txt", append=TRUE)
    summary(rnorm(80))
    sink()}


When you do the following:

for (i in 1:100) {
    summary(rnorm(80))}

what output do you get?

And all this output is redirected to your file by sink(), so it works
as expected.

-- 
Johannes Hüsing               There is something fascinating about science. 
                              One gets such wholesale returns of conjecture 
mailto:[EMAIL PROTECTED]  from such a trifling investment of fact.              
  
http://derwisch.wikidot.com         (Mark Twain, "Life on the Mississippi")

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to