From murdoch at stats.uwo.ca  Sat Feb  4 19:22:36 2006
From: murdoch at stats.uwo.ca (Duncan Murdoch)
Date: Sat, 04 Feb 2006 13:22:36 -0500
Subject: [Rd] Rprintf loop status does not print under windows
In-Reply-To: <200602041814.k14IEYSR012282@badlands.software.umn.edu>
References: <200602041814.k14IEYSR012282@badlands.software.umn.edu>
Message-ID: <43E4F0EC.9060108@stats.uwo.ca>

On 2/4/2006 1:14 PM, Andrew Finley wrote:
> Hello,
> I am writing a c/c++ extension package that does some mcmc sampling, and
> periodically writes the sampling status to the terminal via Rprintf.  So in
> my sampling loop I have:
> 
> if(status == 100){
>   Rprintf("%i...", s);
>   status = 0;
> }
> status++;
> 
> Under linux/unix this works fine, but under windows the status is not
> printed.  Am I missing something?

Looks like you have buffering enabled (the default).  In the Misc menu 
item, uncheck "buffered output" and you should see things sooner (but 
slower).

Duncan Murdoch



[Rd] Rprintf loop status does not print under windows
Duncan Murdoch