blob: 1c27632f6b76380a78e1288762f620243a96a102 [file] [log] [blame]
Hao Zhu971d89f2017-06-07 19:22:47 -04001---
2title: "Untitled"
Hao Zhua31e97f2017-06-08 14:55:41 -04003output:
4 pdf_document:
5 keep_tex: true
Hao Zhu971d89f2017-06-07 19:22:47 -04006---
7
8```{r setup, include=FALSE}
9knitr::opts_chunk$set(echo = TRUE)
10```
11
12```{r}
13library(tidyverse)
14library(knitr)
15library(kableExtra)
16
17dt <- rbind(mtcars, mtcars)
18
Hao Zhu7d4a3e32017-06-08 21:29:13 -040019# kable(dt, "latex", longtable = T, caption="test table") %>%
20# add_header_above(c(" ", "a" = 6, "b" = 5)) %>%
21# kable_styling(latex_options = "repeat_header")
Hao Zhu971d89f2017-06-07 19:22:47 -040022```
Hao Zhua31e97f2017-06-08 14:55:41 -040023
24```{r}
Hao Zhu7d4a3e32017-06-08 21:29:13 -040025kable(dt, "latex", longtable = T, caption = "test", booktabs = T) %>%
26 kable_styling(latex_options = c("striped", "repeat_header"), repeat_header_text = "(...)")
Hao Zhufdec1842017-06-08 17:06:04 -040027```
28
29```{r}
30kable(dt, "latex", longtable = T, booktabs = T) %>%
31 add_header_above(c(" ", "a" = 6, "b" = 5)) %>%
32 kable_styling(latex_options = "repeat_header", repeat_header_text = "(cont.)")
Hao Zhua31e97f2017-06-08 14:55:41 -040033```