title: Display a data frame as table in R Markdown
body: <p>In <strong>knitr</strong> I want to add a (small) data frame as a table using the kable package: </p>
  
  <pre><code>---
  output: html_document
  ---
  
  ```{r}
  knitr::kable(mtcars[1:5,1:5], format="html")
  ```
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/mkoil.png" rel="noreferrer"><img src="https://i.stack.imgur.com/mkoil.png" alt="enter image description here"></a></p>
  
  <p>This returns a compact table as above, while changing it to <code>format="markdown"</code>returns a nice table but spanning the whole page:</p>
  
  <p><a href="https://i.stack.imgur.com/gMCKG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gMCKG.png" alt="enter image description here"></a></p>
  
  <p>I have found the <a href="https://cran.r-project.org/web/packages/knitr/knitr.pdf" rel="noreferrer">knitr manual</a> but it does not cover the extra formatting options for each format. How can I change the size of a <strong>knitr</strong> table or even better, where can I get this information from?  </p>