library(Rmdanimation) # use cat to avoid the addition of line-numbering to the markdown string cat(animatedGIF({for (i in 0:10) plot(i, i, xlim=c(0,10), ylim=c(0,10))}, "myfirstanimation", interval=0.2, allowHTML=FALSE))
r animatedGIF({for (i in 0:10) plot(i, i, xlim=c(0,10), ylim=c(0,10))}, "secondanimation", interval=0.2)
Again the animation can be restarted by clicking on it
r animatedGIF({for (i in 0:10) plot(i, i, xlim=c(0,10), ylim=c(0,10))}, "thirdanimation", interval=0.2, loop=1)
r animatedHTML({for (i in 0:10) plot(i, i, xlim=c(0,10), ylim=c(0,10))}, "htmlanimation", interval=0.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.