title: What is the difference between knitHTML and rmarkdown render?
body: <p>I am using RStudio version 0.98.501, R version 3.0.2 on Windows 7. I have following code written in a .Rmd file:</p>
  
  <pre><code>---
  title: "Sample Document"
  output:
    html_document:
      toc: true
      theme: united
  ---
  
  
  Title
  ========================================================
  
  This is an R Markdown document. Markdown is a simple formatting syntax for authoring web pages (click the **Help** toolbar button for more details on using R Markdown).
  
  When you click the **Knit HTML** button a web page 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}
  summary(cars)
  ```
  
  You can also embed plots, for example:
  
  ```{r fig.width=7, fig.height=6}
  plot(cars)
  ```
  
  Literature Review
  ==================
  this is sample text
  
  Hello
  ------
  
  World!
  
  ### Subsection
  
  this is subsection
  </code></pre>
  
  <p>When I click <code>knitHtml</code> button the created html file DOES NOT contain the table of contents. However when I use following code, it creates the table of contents and change the theme to <code>united</code>:</p>
  
  <pre><code>rmarkdown::render('C:/Users/durraniu/Documents/Trajectory1/knitHtml/test.Rmd')
  </code></pre>
  
  <p>What is the difference and how can I make knitHtml button work the way the code does?</p>