I am making a presentation in RMarkdown using ioslides. I am trying to add a table of text, and the first column is bold. I would like to either make both columns bold or both columns not bold.
For example, in this presentation, the x column is bold and the y column is not:
---
title: test
output: ioslides_presentation
---
##
| x | y |
---------
| 1 | 2 |
I have also tried making the table in a chunk of R code and using kableExtra
to make the second column bold, but then ioslides does not format the table nicely (and so in this case only the second column is bold, and the table does not look nice in the presentation). For example:
##
```{r, echo = FALSE}
library(kableExtra)
mat <- matrix(c(1,2), nrow = 1, dimnames = list(NULL, c('x', 'y')))
mat.kable <- kable(mat)
column_spec(mat.kable, 2, bold = TRUE)
```