2

I am creating an html presentation using slidify (which in turn uses knitr) in which I am incorporating an animation displayed via scianimator (i.e. by setting the knitr options opts_knit$set(animation.fun = hook_scianimator)). This all works perfectly. However, the animation starts autoplaying as soon as the html is loaded. This is caused by the generated javascript code .scianimator("play");. Of course, I can delete this manually from the html file. But my goal is to generate the complete html presentation automatically without the need for manual corrections in the html file. Is it possible to set knitr options, redefine the hook_scianimator function, or some other approach in order for this to work?

So that others can reproduce this: I've put my source package here http://www.let.rug.nl/wieling/statscourse/lecture5/lecture5.7z If it is unzipped and the html file is opened in a browser (Chrome, Firefox), the animation op slide 16 is already playing (it starts when the html file is loaded). The original markdown/slidify source is index.Rmd in the same archive.

Note that if I upload the data to a webserver: http://www.let.rug.nl/~wieling/statscourse/lecture5/#16, the Scianimator animation does not play at all.

Any help would be very much appreciated!

  • Welcome to StackOverflow. A [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) would be helpful – polka Dec 12 '15 at 16:19

0 Answers0