title: integrating manipulate outputs with knitr
body: <p>I was wondering if there is a way in which its possible to integrate the <code>manipulate</code> package or <code>gWidgetsManipulate</code> package so that their outputs can be viewable/manipulable in the html/markdown output file, as I think that this would be extremely useful when developing reproducible interactive research reports. I know that googleVis has some functionality that allows it to be integrated with knitr so that the outputs go into the html file by using options like results='asis' but googleVis is currently quite restrictive in its capabilities when using sliders for example.</p>
  
  <p>If the package outputs of manipulate or gWidgetsManipulate hasn't quite been integrated yet, would it be possible to suggest a workaround for the time being that will allow it to be viewed in the html file?</p>
  
  <p>i.e. my current code in my Rmd file before running knitr-ing to html looks like the below...but I get the following errors.</p>
  
  <pre><code>```{r}
  library(manipulate)
  manipulate(plot(1:x), x = slider(5, 10))
  ```
  </code></pre>
  
  <p>with output </p>
  
  <pre><code>library(manipulate)
  ## Error: there is no package called 'manipulate'
  manipulate(plot(1:x), x = slider(5, 10))
  ## Error: could not find function "manipulate"
  </code></pre>
  
  <p>so trying the package gWidgetsManipulate instead...</p>
  
  <pre><code>```{r}
  library(gWidgetsManipulate)
  manipulate(plot(1:x), x = slider(5, 10))
  ```
  </code></pre>
  
  <p>you get the error...</p>
  
  <pre><code>library("gWidgetsManipulate")
  ## Loading required package: gWidgets
  manipulate(plot(1:x), x = slider(5, 10))
  ## Error: unable to find an inherited method for function ".gwindow", for signature "NULL"
  </code></pre>
  
  <p>I have tried to specify a guiToolkit to fix this error by using things like</p>
  
  <pre><code>options(guiToolkit="WWW")
  </code></pre>
  
  <p>but to no avail...</p>
  
  <p>Any help would be greatly appreciated, thanks in advance</p>