title: Rotate a table from R markdown in pdf
body: <p>I'm writing in R Markdown and have a contingency table that is quite wide. I am converting the R markdown document to a PDF using pandoc.</p>
  
  <p>Is it possible to rotate or shrink the table? Ideally this would be done without having to switch to LaTeX formatting.</p>
  
  <p><strong>My Attempts:</strong></p>
  
  <p>I've been abusing the figure options in knitr to attempt this, but whether I use kable or xtable, I haven't had any luck. Some permutations I have tried include:</p>
  
  <pre><code>```{r out.extra='angle=90', results='asis'}
  library(knitr)
  kable(iris[1:5,])
  ``` 
  
  ``{r size='footnotesize', results='asis'}
  library(knitr)
  kable(iris[1:5,])
  ```
  
  ```{r out.extra='angle=90', results='asis'}
  library(xtable)
  xtable(iris[1:5,])
  ```
  
  ```{r size='footnotesize', results='asis'}
  library(xtable)
  xtable(iris[1:5,])
  ```  
  </code></pre>
  
  <p>All of these show the table nicely, but do not rotate it.</p>
  
  <p>The code I'm using to knit is:</p>
  
  <pre><code>Rscript -e "library(knitr); knit('table.Rmd', 'table.md')"
  </code></pre>
  
  <p>And to convert to pdf:</p>
  
  <pre><code>pandoc table.md -o table.pdf
  </code></pre>