blob: 3083fa301682220dbdff365b07748ad44f17f3a0 [file] [log] [blame]
Hao Zhu2ce42b92017-06-15 17:15:33 -04001---
2title: "add_header_left"
3output:
4 pdf_document:
5 keep_tex: true
6---
7
8```{r}
9library(knitr)
10library(kableExtra)
11
12mtcars[1:10, 1:6] %>%
13 kable("latex", booktabs= T) %>%
Hao Zhubf5bfe22017-06-21 14:37:41 -040014 kable_styling(latex_options = "striped") %>%
Hao Zhu2ce42b92017-06-15 17:15:33 -040015 add_header_above(c(" ", "a%" = 3, "b" = 3)) %>%
Hao Zhubf5bfe22017-06-21 14:37:41 -040016 add_header_left(c("a%knjnuulkjlkj" = 3, "b" = 7), "new", align = "l") %>%
Hao Zhu32f43f72017-06-20 18:24:54 -040017 add_header_left(c("aadjfoi adlfsjs adsa" = 4, "b" = 6), "new2", width = "1.5cm") %>%
18 add_header_left(c("a" = 5, "b" = 5), "xx", width = "1cm", align = "r")
Hao Zhu2ce42b92017-06-15 17:15:33 -040019```