title: LaTeX Code from Kable showing up in R markdown PDF?
body: <p>I am trying to put a table in my R-markdown report and I like the table that this produces but the laTeX code is showing up in the report. What am I doing wrong? Please see picture and code for reference. I am very new at LaTeX and markdown and really have no idea what I'm doing haha. The data is blacked out in the image for security reasons. Thank you!</p>
  
  <p><a href="https://i.stack.imgur.com/jCbVy.png" rel="nofollow noreferrer">PDF output with issues :( (link)</a></p>
  
  <pre><code>---
  title: "Deal Fees by Client Ownership 2008-2018"
  output:
    pdf_document: default
    html_document: default
    word_document: default
  header-includes:
      - \usepackage{booktabs}
      - \usepackage{caption}
  ---
  ```{r, echo = FALSE, message = FALSE}
  
  library(knitr)
  library(scales)
  library(ggplot2)
  library(lubridate)
  library(dplyr)
  library(reshape2)
  library(xtable)
  library(kableExtra)
  ```
  ```{r, echo = FALSE, message = FALSE, comment=NA, results = 'asis'}
  
  
  kable(df, format = "latex", caption = "Fee variances ($ millions)", booktabs = T) %&gt;% 
    kable_styling() %&gt;% 
    group_rows("Average", 1, 4) %&gt;% 
    group_rows("Median", 5, 8)
  
  ```
  </code></pre>