[R] Plot timer in a for loop
Jan T. Kim
jtk at cmp.uea.ac.uk
Tue Jun 10 11:05:37 CEST 2008
On Mon, Jun 09, 2008 at 02:02:01PM -0700, Ken Spriggs wrote:
>
> Hello,
>
> This code works fine but is so fast I can't see anything but the last plot.
>
> for (i in nrow(X)){
> plot(as.numeric(d[i,])) }
>
> I'd like to view a plot every 500 milliseconds, nrow(X) = 400. How?
Adding the line
Sys.sleep(0.5);
to the loop should do this trick.
Best regards, Jan
--
+- Jan T. Kim -------------------------------------------------------+
| email: jtk at cmp.uea.ac.uk |
| WWW: http://www.cmp.uea.ac.uk/people/jtk |
*-----=< hierarchical systems are for files, not for humans >=-----*
More information about the R-help
mailing list