blob: fa0668ade3e524d1d4b5710e939e20dabdb94612 [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}
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.)")
```