explicit call to print usually works for me.

library(audio)
for (i in 1:5){
        wait(60)
        print(Sys.time())
        }


On Jul 1, 2010, at 4:30 PM, Matt Shotwell wrote:

> Try to flush output after printing:
>
> cat(paste(Sys.time()),"\n"); flush(stdout())
>
> On Thu, 2010-07-01 at 16:17 -0400, Jack Luo wrote:
>> Hi,
>>
>> I am doing some computation which is pretty time consuming, I want  
>> R to
>> display CPU time after each iteration using the command Sys.time().  
>> However,
>> I found that the code only began to display the CPU time after  
>> quite a while
>> and several iterations have finished. Is there a way to ask R to  
>> display
>> time right after each iteration is finished?
>>
>> Thanks,
>>
>> -Jun
>>
>>      [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> 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.
> -- 
> Matthew S. Shotwell
> Graduate Student
> Division of Biostatistics and Epidemiology
> Medical University of South Carolina
> http://biostatmatt.com
>
> ______________________________________________
> 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.


        [[alternative HTML version deleted]]

______________________________________________
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