rmarkdown-cookbook
rmarkdown-cookbook copied to clipboard
Add an example for kable html format to get same display as Pandoc Markdown table
See discussion in https://github.com/rstudio/rmarkdown/issues/1954#issuecomment-733070556
With this, markdown table will be used, and displayed using bootstrap style by rmarkdown
---
title: "table format"
output: html_document
---
```{r}
knitr::kable(iris)
```
With this, it won't use bookstrap style
---
title: "table format"
output: html_document
---
```{r}
knitr::kable(iris)
```
unless you add the class yourself
---
title: "table format"
output: html_document
---
```{r}
knitr::kable(iris, "html", table.attr = 'class="table table-condensed"')
```
And suggestion is to have an option to set it globally https://github.com/yihui/knitr/pull/1922