title: Make table in R Markdown using tabular() and booktabs
body: <p>I am using the <code>tabular()</code> function in the <code>tables</code> package to make tables in an R Markdown file.  I would like to use the <code>booktabs()</code> option to include a horizontal rule.  However, when I do so, the code from <code>booktabs()</code> appears in my LaTex document, even when I set the chuck option to <code>echo=FALSE</code>. </p>
  
  <p>How can I use the <code>booktabs()</code> option with <code>tabular</code>?</p>
  
  <p>Output: 
  <a href="https://i.stack.imgur.com/ipuXN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ipuXN.jpg" alt="tables with booktabs output"></a></p>
  
  <p>And here is the code for the example:</p>
  
  <pre><code>---
  title: "Making Tables"
  output:
    pdf_document: default
  header-includes: \usepackage{booktabs}
  ---
  
  ```{r setup, include=FALSE}
  knitr::opts_chunk$set(echo = FALSE)
  
  library(tables)
  library(Hmisc)
  ```
  
  ```{r no line, results='asis'}
  latex(tabular( (Species + 1) ~ (n=1) + Format(digits=2)*(Sepal.Length + Sepal.Width)*(mean + sd), data = iris))
  ```
  
  ```{r with line, results='asis', echo = FALSE}
  booktabs()
  latex(tabular( (Species + 1) ~ (n=1) + Format(digits=2)*(Sepal.Length + Sepal.Width)*(mean + sd), data = iris))
  ```
  </code></pre>