title: Rotating a table in PDF output from RMarkdown with more than one page
body: <p>I want to rotate a wide table in my PDF output. I came across <a href="https://stackoverflow.com/questions/21840878/rotate-a-table-from-r-markdown-in-pdf?lq=1">this fantastic question</a>, but my table is longer.</p>
  
  <p>When I copy/paste one of the examples shown in that question, it works nice using RMarkdown.</p>
  
  <pre><code>library(kableExtra)
  
  kable(iris[1:5,],
        format = "latex", booktabs = TRUE) %&gt;%
    kableExtra::landscape()
  </code></pre>
  
  <p>However, if we remove the subsetting we see that the table exceeds the dimension of the page.</p>
  
  <pre><code>library(kableExtra)
  
  kable(iris,
        format = "latex", booktabs = TRUE) %&gt;%
    kableExtra::landscape()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/OnJbt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OnJbt.png" alt="enter image description here"></a></p>
  
  <p>So my question is very simple: <strong>how can we create as many PDF pages as needed by splitting the table in parts?</strong></p>