r markdown kable break table width into multiple tables below each other
<p>Is there a way to tell <code>kable</code> to break a long table (that would exceed the text or page width) into multiple ones that are shown below each other? </p>

<p>I mean, you can do this like this:</p>

<pre><code>```{r}
data &lt;- data.frame(....)
kable(data[,1:6])
kable(data[,7:12])
```
</code></pre>

<p>But this is a lot of work in figuring out where to break the data.frame. Is there a way to do it automatically? I found no option in the <code>kable</code> function itself.</p>

<p>One way to do it computationally is to calculate the string width of the longest entries in the table (and the header) and break the table depending on this. But I still hope there is already a good way to do it...</p>

<p>Optimally I would like to do this for html page generation, but a way to do it for latex would also be great.</p>