[R] wait for graph to finish plotting

news at aleblanc.cotse.net news at aleblanc.cotse.net
Fri Oct 22 11:54:09 CEST 2010


I want to plot and then save graphs in a loop.
The problem is that the graphs take too long to plot. Execution jumps to the save command (dev.copy2eps)
before the plotting has finished, and so the wrong graph is saved.

I works fine if I step through slowly command at a time, but I want to do it programmatically.
How can I tell R to wait for the graph to finish? 
I have tried Sys.sleep, but that doesn't work.


-- 
aleblanc



More information about the R-help mailing list