I just need to change the background color of the whole table to white. A reproducible example
kable(head(iris)) %>%
kable_styling("striped", full_width = FALSE, htmltable_class = 'lightable-classic-2') %>%
add_header_above(c("Measurements" = 4L, " " = 1L)) %>%
kable_paper() %>%
save_kable(file = 'tableX.png')
What've found/tried:
add_header_above()
has a background argument but that only affects the header.save_kable()
has the bs_theme
argument but I can't find what the options are.extra_css
argument but can't find a function that affects the whole table.You can find some examples of bs_theme
at bootswatch.com
For my example I used flatly
.
library(kableExtra)
kable(head(iris)) %>%
kable_styling("striped", full_width = FALSE, htmltable_class = 'lightable-classic-2') %>%
add_header_above(c("Measurements" = 4L, " " = 1L)) %>%
kable_paper() %>%
save_kable(file = 'tableX.png', bs_theme = "flatly")