---
title: "Untitled"
output: pdf_document
---

```{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, booktabs = T) %>%
  add_header_above(c(" ", "a" = 6, "b" = 5)) %>%
  kable_styling(latex_options = "repeat_header")
```
