Nothing
We can set the package option animation.fun
to hook_scianimator
so that
multiple plots in a chunk can be animated via the SciAnimator library.
library(knitr) opts_knit$set(animation.fun = hook_scianimator)
You have to embed the jQuery and SciAnimator libraries in the HTML header
(between <head>
and </head>
), even though some browsers can tolerate it
if you insert a style sheet after <body>
.
Here comes a test of the Brownian motion:
n = length(palette()) x = rnorm(n); y = rnorm(n) for (i in 1:20) { x = x + rnorm(n); y = y + rnorm(n) plot(x, y, xlim=c(-10, 10), ylim=c(-10,10), pch=19, col=1:n, cex=2) }
There are many other examples at http://vis.supstat.com.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.