title: What is a neat command line equivalent to RStudio's Knit HTML?
body: <p>What is a neat command line equivalent to RStudio's Knit HTML? Given an <code>.Rmd</code> file, you can use RStudio to knit <code>.html</code>, <code>.docx</code> and <code>.pdf</code> files using Knitr. It would be great to shift this process completely to the command line. My approach so far:</p>
  
  <pre><code>Rscript -e "library(knitr); knit('test.Rmd')"  # This creates test.md
  pandoc test.md &gt;&gt; test.html
  </code></pre>
  
  <p>This works fine, but the resulting <code>test.html</code> does not come with the same pretty make over as in RStudio. Any suggestions how one should best knit <code>.Rmd</code> files to <code>.html</code> via the command line, and end up with a pretty <code>.html</code>?</p>
  
  <p>Extra question: What would be the best command line solution for <code>.pdf</code> or <code>.docx</code>?</p>