Mohammad Tanvir Ahamed
2015-Nov-07 03:56 UTC
[R] Read a file on every 0.5 (or less) second intervall
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 G?teborg, Sweden | mashranga at yahoo.com [[alternative HTML version deleted]]
?Sys.sleep Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Fri, Nov 6, 2015 at 10:56 PM, Mohammad Tanvir Ahamed via R-help < r-help at 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 > G?teborg, Sweden | mashranga at yahoo.com > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.[[alternative HTML version deleted]]
peter dalgaard
2015-Nov-07 10:22 UTC
[R] Read a file on every 0.5 (or less) second intervall
> On 07 Nov 2015, at 04:56 , Mohammad Tanvir Ahamed via R-help <r-help at 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 AhamedSys.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 | mashranga at yahoo.com > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.mes at cbs.dk Priv: PDalgd at gmail.com