| --- |
| title: "kable_styling - HTML" |
| output: html_document |
| vignette: > |
| %\VignetteIndexEntry{htmlTable Styling Guide} |
| %\VignetteEngine{knitr::rmarkdown} |
| %\VignetteEncoding{UTF-8} |
| --- |
| |
| # Plain HTML |
| ```{r} |
| library(knitr) |
| library(kableExtra) |
| dt <- mtcars[1:5, 1:2] |
| |
| kable(dt, format = "html") |
| ``` |
| |
| # Basic Bootstrap Table |
| ```{r} |
| kable(dt, format = "html") %>% |
| kable_styling() |
| ``` |
| |
| # Boostrap Table Options |
| ## Striped |
| ```{r} |
| kable(dt, format = "html") %>% |
| kable_styling(bootstrap_options = "striped") |
| ``` |
| |
| ## Striped + Hover |
| ```{r} |
| kable(dt, format = "html") %>% |
| kable_styling(c("striped", "hover", "primary")) |
| ``` |
| |
| ## Other bootstrap options |
| ```{r} |
| kable(dt, format = "html") %>% |
| kable_styling(c("striped", "bordered", "hover", "condensed", "responsive")) |
| ``` |
| |
| # "Thin" Table and Floating options |
| ```{r} |
| kable(dt, format = "html") %>% |
| kable_styling(c("striped", "bordered", "condensed"), full_width = F) |
| ``` |
| |
| ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, |
| ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, |
| ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, |
| ```{r} |
| kable(dt, format = "html") %>% |
| kable_styling(c("striped", "condensed"), full_width = F, |
| position = "float_right", font_size = 10) %>% |
| add_header_above(c(" ", "Names[note]" = 2)) %>% |
| add_footnote("footnote") |
| ``` |
| |
| ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, ;ojadsf sadfls;af ewejdalsf,asf ,weifojsfakslf, |
| |