title: R Run knitr from a batch-file (windows)
body: <p>I run some automatic reports each day with batch-files on my windows-computer. But how do I do this with a .rmd file and generate the html-output? </p>
  
  <p>So, this works for me using a batchfile with a normal .R file: </p>
  
  <pre><code>"C:\R\R-3.0.1\bin\x64\Rscript.exe" --default-packages=methods 
  "C:\R\R-3.0.1\bin\x64\Scripts\models.R"
  </code></pre>
  
  <p>But, this won't: </p>
  
  <pre><code>"C:\R\R-3.0.1\bin\x64\Rscript.exe" --default-packages=methods,knitr 
  "C:\R\R-3.0.1\bin\x64\Scripts\test_knitr.Rmd"
  </code></pre>
  
  <p>I've tried some variations inspired by command-line like: </p>
  
  <pre><code>"C:\R\R-3.0.1\bin\x64\Rscript.exe" --default-packages=methods,knitr 
  knit("C:\R\R-3.0.1\bin\x64\Scripts\test_knitr.Rmd")
  </code></pre>
  
  <p>But no succes so far! Im a total knitr/.rmd newbee, so I'm not even sure it can be done. </p>