title: Can't generate plotly interactive plots in Rmarkdown report
body: <p>I have an Rmarkdown document with a plot made with plotly and would like to generate an html file. It works when I click on <em>Knit to HTML</em> in Rstudio, but not when I run the following on the command line:</p>
  
  <pre><code>Rscript -e "require(knitr)" -e "require(markdown)" -e "knit('Untitled.Rmd', out='report.md')" -e "markdownToHTML('report.md', 'report.html')"
  </code></pre>
  
  <p>After this, I have a report.html file which contains the plot generated with plotly, but it is not interactive.
  Does anyone know how to make it interactive with the command line?</p>
  
  <p>Thanks</p>
  
  <p>This is the code, btw:</p>
  
  <pre><code>---
  title: "Untitled"
  output: html_document
  ---
  
  ```{r setup, include=FALSE}
  knitr::opts_chunk$set(echo = TRUE)
  ```
  
  ## R Markdown
  
  This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see &lt;http://rmarkdown.rstudio.com&gt;.
  
  When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
  
  ```{r cars}
  summary(cars)
  ```
  
  ## Including Plots
  
  You can also embed plots, for example:
  
  ```{r pressure_ggplot, echo=FALSE}
  library(ggplot2)
  library(plotly)
  ggplot(pressure,aes(temperature,pressure))+geom_point(size=10,color='red')
  ```
  
  Note that the `echo = FALSE` parameter was added to the code chunk to prevent printing of the R code that generated the plot.
  ```{r pressure_plotly, echo=FALSE}
  
  g&lt;-ggplot(pressure,aes(temperature,pressure))+geom_point(size=10,color='red')
  ggplotly(g)
  ```
  ```{r}
  sessionInfo()
  ```
  </code></pre>