Hi all, Easy question for you (which I failed to find the answer to in the FAQ etc). I've recently been forced to switch from linux to windows (currently windows NT), and my usual habit of putting lots of "cat" statements in slow functions to get an idea of the progress rate is no longer useful. Why -- because R waits until the function is completely finished before printing the cat statements all at once to the screen. Don't know if this is an R thing or a windows thing, but if there is a way to get cat statements printed to the screen as soon as the function calls it, I'd like to hear it! Using R version 1.6.2. Cheers, Rob.
rob foxall (IFR) wrote:> Hi all, > Easy question for you (which I failed to find the answer to in the FAQ etc). I've recently been forced to switch from linux to windows (currently windows NT), and my usual habit of putting lots of "cat" statements in slow functions to get an idea of the progress rate is no longer useful. Why -- because R waits until the function is completely finished before printing the cat statements all at once to the screen. Don't know if this is an R thing or a windows thing, but if there is a way to get cat statements printed to the screen as soon as the function calls it, I'd like to hear it! Using R version 1.6.2.It *is* in the R for Windows FAQs, Section 6.3. Uwe Ligges> Cheers, > Rob. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help
It would be even easier if you read the R for Windows FAQ, Q6.3 in particular. Andy> -----Original Message----- > From: rob foxall (IFR) [mailto:rob.foxall at BBSRC.AC.UK] > Sent: Tuesday, February 25, 2003 10:17 AM > To: 'r-help at stat.math.ethz.ch' > Subject: [R] cat in windows vs linux > > > Hi all, > Easy question for you (which I failed to find the > answer to in the FAQ etc). I've recently been forced to > switch from linux to windows (currently windows NT), and my > usual habit of putting lots of "cat" statements in slow > functions to get an idea of the progress rate is no longer > useful. Why -- because R waits until the function is > completely finished before printing the cat statements all at > once to the screen. Don't know if this is an R thing or a > windows thing, but if there is a way to get cat statements > printed to the screen as soon as the function calls it, I'd > like to hear it! Using R version 1.6.2. > > Cheers, > Rob. > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listinfo/r-help >------------------------------------------------------------------------------
>-----Original Message----- >From: r-help-admin at stat.math.ethz.ch >[mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of rob foxall (IFR) >Sent: Tuesday, February 25, 2003 9:17 AM >To: 'r-help at stat.math.ethz.ch' >Subject: [R] cat in windows vs linux > > >Hi all, > Easy question for you (which I failed to find the >answer to in the FAQ etc). I've recently been forced to switch >from linux to windows (currently windows NT), and my usual >habit of putting lots of "cat" statements in slow functions to >get an idea of the progress rate is no longer useful. Why -- >because R waits until the function is completely finished >before printing the cat statements all at once to the screen. >Don't know if this is an R thing or a windows thing, but if >there is a way to get cat statements printed to the screen as >soon as the function calls it, I'd like to hear it! Using R >version 1.6.2. > >Cheers, > Rob.You might wish to try to turn off "buffered output", which is on the "Misc" menu in Rgui. BTW, this is in the R Windows FAQ: 6.3 When using Rgui the output to the console seems to be delayed. This is deliberate: the console output is buffered and re-written in chunks to be faster and less distracting. You can turn buffering off or on from the `Misc' menu or the right-click menu: <Ctrl-W> toggles the setting. If you are sourcing R code or writing from a function, there is another option. A call to the R function flush.console() will write out the buffer and so update the console. HTH, Marc Schwartz