Reputation: 45
I am building a table using kable and I would like to add a caption below the tale. However, the caption is automatically set above the table. Is there a way to change this?
Thanks a lot!
tb <- kable(x, caption = 'yyy', digits=c(0, 3, 2, 2, 0, 3, 2), booktabs=T) %>%
kable_styling(latex_options="scale_down")
Upvotes: 1
Views: 1971
Reputation: 1059
For HTML output, you may add this CSS snippet to your RMarkdown document:
```{css, echo=FALSE}
table { caption-side: bottom }
```
Upvotes: 1
Reputation: 389235
How about using footnote
?
library(knitr)
library(kableExtra)
kable(mtcars[1:5, 1:5], booktabs=T) %>%
kable_styling(latex_options="scale_down") %>%
footnote(general = "yyy", general_title = "")
Upvotes: 1