So far I created several pngs in R and used ani.options and im.convert from the animation package to create a gif animation (ImageMagick is installed on Windows). It works without any problems:
`ani.options(nmax = 100, loop = 1, interval = 0.1)
for(i in 1:100){
name = rename(i)
png(name)
plot(...)
dev.off()
}
im.convert("*.png", output ="animation.gif", convert = c("convert"),
cmd.fun = if (.Platform$OS.type == "windows") shell else system,
extra.opts = "",clean = TRUE)`
Insead of png-files I would like to convert pdfs to a gif animation. Again I generated and saved several pdfs in a for-loop without any problems. The challenge is now to convert these pdfs to a gif-animation. I tried different approaches but I can't figure out how to modify the im.convert command and how to set ani.options parameters to combine the pdfs in a gif-animation.
So far, I tried setting ani.type and ani.dev to pdf and changed ".png" in im.convert to ".pdf".
I am gratefull for any suggestions.