I'm trying to create a GIF that loops with the animation
package in R. But for some reason, even if I set the option loop=TRUE
, the images I make only play once and then stop. I would like the GIF to keep playing indefinitely. Any tips?
install.packages("animation")
library(animation)
saveGIF({
for (i in 1:10) plot(runif(10), ylim = 0:1)
},loop=TRUE,interval=0.2)
The following works for me.
loop=TRUE
is the default setting. Are you sure that the problem is not in your GIF viewer?p.s. I'm guessing that your code works without the addition of the pointer to the
convert.exe
program since you are able to produce the .gif.