Reputation: 7464
In Beamer presentation created using rmarkdown I have a slide with table, e.g.
## Slide with table
```{r, asis = TRUE}
dat <- mtcars
knitr::kable(dat)
```
How can I control the font size so that the whole table fits the slide?
Upvotes: 2
Views: 1632
Reputation: 576
I'd suggest trying the kableExtra package.
Otherwise, the easiest way I know of is to specify a CSS class for the table and then define the font size in CSS. See how to colour different Rmarkdown kable tables in different colour
Upvotes: 3