Dear Philippe,
Perhaps you could try a different graphics device (maybe postscript). On my machine, the time differences were all 1 second rather than the 3 you reported. If 300s is really too long for you, you could get a new computer or run your script on a faster one.
Let me point out that the "shut down" of a device means that the final calculations and writing of the file is done at that time. So we have to expect it consumes some time.
Uwe Ligges
Andrew C. Ward
CAPE Centre Department of Chemical Engineering The University of Queensland Brisbane Qld 4072 Australia [EMAIL PROTECTED]
Quoting Philippe Hupé <[EMAIL PROTECTED]>:
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
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help