Hao Zhu | 971d89f | 2017-06-07 19:22:47 -0400 | [diff] [blame] | 1 | --- |
2 | title: "Untitled" | ||||
3 | output: pdf_document | ||||
4 | --- | ||||
5 | |||||
6 | ```{r setup, include=FALSE} | ||||
7 | knitr::opts_chunk$set(echo = TRUE) | ||||
8 | ``` | ||||
9 | |||||
10 | ```{r} | ||||
11 | library(tidyverse) | ||||
12 | library(knitr) | ||||
13 | library(kableExtra) | ||||
14 | |||||
15 | dt <- rbind(mtcars, mtcars) | ||||
16 | |||||
17 | kable(dt, "latex", longtable = T, booktabs = T) %>% | ||||
18 | add_header_above(c(" ", "a" = 6, "b" = 5)) %>% | ||||
19 | kable_styling(latex_options = "repeat_header") | ||||
20 | ``` |