Hao Zhu | 2ce42b9 | 2017-06-15 17:15:33 -0400 | [diff] [blame] | 1 | --- |
2 | title: "add_header_left" | ||||
3 | output: | ||||
4 | pdf_document: | ||||
5 | keep_tex: true | ||||
6 | --- | ||||
7 | |||||
8 | ```{r} | ||||
9 | library(knitr) | ||||
10 | library(kableExtra) | ||||
11 | |||||
12 | mtcars[1:10, 1:6] %>% | ||||
13 | kable("latex", booktabs= T) %>% | ||||
14 | # kable_styling(latex_options = "striped") %>% | ||||
15 | add_header_above(c(" ", "a%" = 3, "b" = 3)) %>% | ||||
16 | add_header_left(c("a%" = 3, "b" = 7), "new") %>% | ||||
17 | add_header_left(c("a" = 4, "b" = 6), "new2") %>% | ||||
18 | group_rows("aasd", 4, 6) | ||||
19 | |||||
20 | ``` |