blob: 382e81eaa8136af85a265a322ac051516817aa63 [file] [log] [blame]
---
title: "Untitled"
output:
pdf_document:
keep_tex: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(tidyverse)
library(knitr)
library(kableExtra)
dt <- rbind(mtcars, mtcars)
kable(dt, "latex", longtable = T, caption="test table") %>%
add_header_above(c(" ", "a" = 6, "b" = 5)) %>%
kable_styling(latex_options = "repeat_header")
```
```{r}
aaa <- kable(dt, "latex", longtable = T, caption="table2", booktabs = T) %>%
add_header_above(c(" ", "a" = 6, "b" = 5)) %>%
kable_styling(latex_options = "repeat_header", repeat_header_text = "(...)")
```
```{r}
kable(dt, "latex", longtable = T, booktabs = T) %>%
add_header_above(c(" ", "a" = 6, "b" = 5)) %>%
kable_styling(latex_options = "repeat_header", repeat_header_text = "(cont.)")
```