flushing of stdout
Joerg,
On Aug 22, 2007, at 11:20 AM, Joerg van den Hoff wrote:
I post this here, since maybe it's only a Mac problem. I noted only now an apparent change of behaviour in 2.5.0 relative to older times:
I'm not aware of any such change. For me the output is still shown
progressively, e.g.:
for (i in 1:10) { cat("foo",i,"\n"); rnorm(1e7); }
Can you, please, send us a reproducible example?
I use `cat' to stdout from within a long running loop to report the loop count to the user. this output is now delayed until the program completes (i.e. the output is buffered) and, thus, does not make much sense anymore... issuing `flush(stdout())' after the `cat' does not help.
.. and it's not meant to (since the R console has nothing to do with stdout) - try flush.console() instead ... Cheers, Simon