title: Animation in R Markdown
body: <p>I am trying to animate a sequence of plots in R Markdown but the video doesn't show up. Taking the advice from <a href="https://stackoverflow.com/questions/12038893/combining-r-markdown-and-animation-package">here</a> I downloaded ffmpeg, but this still didn't get it to work. </p>
  
  <p>I am using R version 3.2.0 and RStudio on OS X El Capitan. Here is my code:</p>
  
  <pre><code>---
  title: "Animate"
  author: "Thomas Bayes"
  date: "February 2, 2016"
  output: html_document
  ---
  
  
  ```{r animate, echo=FALSE,  fig.show = 'animate'}
  x &lt;- seq(from = 0, to = 10, by = .5)
  for(k in 1:5){
      plot(x,sin(k*x), type = 'l')
  }
  ```
  </code></pre>
  
  <p>And the output is just an empty video screen. Nothing happens when I click play.
  <a href="https://i.stack.imgur.com/ITwPE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ITwPE.png" alt="output"></a></p>