Re: [Rd] Refresh every minute

From: Schatzi <>
Date: Wed, 07 Sep 2011 13:30:08 -0700 (PDT)

That works perfect. Thank you.

On Sep 7, 2011, at 3:27 PM, Schatzi wrote:

> I would like some code to rerun every minute, automatically (it calls
> time and I want this to update).
> Here is the code (it is really the plot that I am interested in):
> hourc<-as.numeric(substr(date(),12,13))
> minc<-as.numeric(substr(date(),15,16))
> ftime<-c(hourc,minc)
> barplot(ftime, axes = FALSE, main="Time")
> Is there any way to get this to automatically update every minute or
> do I have to rerun it manually each time I want to see the updated plot?

while (TRUE) {
 hourc<-as.numeric(substr(date(),12,13))  minc<-as.numeric(substr(date(),15,16))
 barplot(ftime, axes = FALSE, main="Time")  Sys.sleep(60)

> I am using microsoft (vista).

In theory, practice and theory are the same. In practice, they are not - Albert Einstein
View this message in context:
Sent from the R devel mailing list archive at

______________________________________________ mailing list
Received on Wed 07 Sep 2011 - 22:47:43 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 08 Sep 2011 - 11:20:29 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive