[R] How to speed the shut down of the graphic device

Philippe Hupé Philippe.Hupe at curie.fr
Fri Aug 1 13:06:48 CEST 2003


hello,

I use R1.7.1 under winXP and I am running the following script example :


for (i in 1:10)
{
        x <- rnorm(100)
        png( paste("D:/essai",i,".png",sep=""))
        plot(x)
        t1 <- Sys.time()
        dev.off()
        t2 <- Sys.time()
        print(t2-t1)
       
}

at each step, it takes about 3 seconds to shut down the graphic device. 
I want to generate about one hundred of image and of course it takes too 
much time. Is there any trick ?

Philippe




More information about the R-help mailing list