title: What does “Knit HTML” do in Rstudio 0.98?
body: <p>I am trying to figure out what command and default options RStudio uses when pressing the "knit HTML" button in RStudio version 0.98.1091 because I get a slightly different intermediate markdown file when I run the <code>knit()</code> function from the console.</p>
  
  <p>Specifically, when I use the following header for the R markdown file:</p>
  
  <pre><code>---
  title: "Report Title"
  author: Daddy the Runner
  date:  "`r format(Sys.time(), '%A, %B %d, %Y')`"
  output: 
    html_document:
      keep_md: true
  ---
  </code></pre>
  
  <p>I get the following markdown file when pressing the "Knit HTML" button:</p>
  
  <pre><code># Report Title
  Daddy the Runner  
  `r format(Sys.time(), '%A, %B %d, %Y')`
  </code></pre>
  
  <p>When I execute the following command: <code>knit("myReport.Rmd")</code>, I get the following markdown file:</p>
  
  <pre><code>---
  title: "Report Title"
  author: Daddy the Runner
  date:  "Saturday, January 10, 2015"
  output: 
    html_document:
      keep_md: true
  ---
  </code></pre>
  
  <p>Clearly the RStudio button is generating the intermediate markdown file using some other options but I can't find any information about it in the RStudio docs.</p>
  
  <p>The key issue is the date line.  For some reason, RStudio doesn't execute the inline r chunk in the header when making the markdown file.  (However, it does get executed before generating the final HTML.)  Whereas, the <code>knit()</code> function call does execute the inline chunk while generating the markdown file.</p>
  
  <p>The only other difference I noticed in the two markdown files is related to the generation of plots.  The two methods generate different sized graphics (command line: 504 x 504) versus (button: 672 x 480) and place them in different directories.</p>
  
  <p>I tried the recommendation in this <a href="https://stackoverflow.com/questions/10646665/how-to-convert-r-markdown-to-html-i-e-what-does-knit-html-do-in-rstudio-0-9">What commands are run when pressing "Knit HTML" on an R Markdown file in Rstudio 0.96?</a> question to insert a <code>Sys.sleep(30)</code> call but that did not provide any information about what call RStudio used to knit the document.  It did pause the output in the R Markdown console window which was unnecessary because RStudio keeps all of the output anyway.  What I didn't see in the output was the command RStudio issued.</p>
  
  <p>Any insight to the nature of these differences would be greatly appreciated.  While I like using IDE environments and the conveniences they provide, I really like to understand what it is they are doing so I can better anticipate their behavior.</p>