> On 07 Nov 2015, at 04:56 , Mohammad Tanvir Ahamed via R-help 
> <r-help@r-project.org> wrote:
> 
> Hi,
> i want to read a file on every 0.5 (or less) second. How can i set this time 
> loop to read a file ?
> Any idea will be appreciated . Thanks .  Tanvir Ahamed 

Sys.sleep() if exact timing is not too critical. Otherwise, using the tcltk 
packages, you can interface to the "after" Tcl command. The generic pattern is 

boo <- function() {if (running) tcl("after", 500, boo) ; cat("boo!\n")}
running <- TRUE; boo()

-pd



>   Göteborg, Sweden     |  mashra...@yahoo.com
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd....@cbs.dk  Priv: pda...@gmail.com

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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