title: How can I render interactive plots into static html to be sent and rendered in an email
body: <p>When I use interactive charts from <a href="https://plot.ly/r/" rel="nofollow noreferrer">plotly</a> or tables from <a href="https://rstudio.github.io/DT/" rel="nofollow noreferrer">datatables</a> and I use <a href="http://rmarkdown.rstudio.com/" rel="nofollow noreferrer">rmarkdown</a> <code>rmarkdown:::render</code> to html I can get interactive charts in a web browser.</p>
  
  <p>When I try to send this html file as an email the interactive graphs are purely not displayed.</p>
  
  <p>I'd like to be able to send a static (I mean non interactive html) so the file can be rendered in the email.</p>
  
  <p>Is it possible ?</p>
  
  <p>Example:</p>
  
  <pre><code>---                                                                                                     
  title: "Sample Document"                                                                                
  output:                                                                                                 
    html_document:                                                                                        
      toc: true                                                                                           
      theme: united                                                                                       
  ---                                                                                                     
  
  ```{r Code Chunk}                                                                                       
  d &lt;- diamonds[sample(1:nrow(diamonds), size = 2000),]                                                   
  plot_ly(d, x = ~carat, y = ~price, color = ~carat, size = ~carat, text = ~paste("Clarity: ", clarity))  
  ```                                                                                                     
  
  ```{r run code, echo=FALSE, eval=FALSE}                                                                 
  library(rmarkdown)                                                                                      
  library(plotly)                                                                                         
  rmarkdown:::render('./dyn_2_statix_html.Rmd')
  ```
  </code></pre>
  
  <p>Which would give the following <code>html</code> page rendered:
  <a href="https://i.stack.imgur.com/idtQ2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/idtQ2.png" alt="enter image description here"></a> </p>