[R] Issue with message()

Rolf Turner rolf.turner at xtra.co.nz
Mon Apr 23 00:12:35 CEST 2012

On 23/04/12 09:36, Axel Urbiz wrote:
> Dear List,
> I built a package under both Mac and Win 7 (both on R 2.12.0) . One of the
> functions in the package is set up to print a status message using the code
> below:
>   if (verbose)
>        if ((i %% 10) == 0&&  i<  ntree) message( "", i, "out of", ntree,
> "trees so far...")
> This works perfectly on the Mac. However, on Win 7 the message is not
> printed while the function is executing, but all when it finished running.
> Any hint what might be the issue?

This has something to do with the Windoze system not (by default)
"flushing the buffer".  This behaviour can be changed, but I forget
the details.  I don't use Windoze.  A bit of searching/googling should
lead you fairly quickly to the appropriate procedure for re-setting
the behaviour.



         Rolf Turner

More information about the R-help mailing list