Hao Zhu | 334376d | 2020-08-19 00:45:09 -0400 | [diff] [blame] | 1 | --- |
2 | title: "duplicated rows" | ||||
3 | output: pdf_document | ||||
4 | --- | ||||
5 | |||||
6 | ```{r} | ||||
7 | library(dplyr) | ||||
8 | library(kableExtra) | ||||
9 | |||||
10 | tbl1 <- bind_rows(mtcars, mtcars, mtcars, mtcars) | ||||
11 | |||||
12 | kable(tbl1, longtable = T, row.names = 1:128) %>% | ||||
13 | pack_rows(index = c("g1" = 3, "g2" = 6, "g3" = 5, "g4" = 5, "g1" = 3, "g2" = 6, "g3" = 5, "g4" = 5, | ||||
14 | "g1" = 3, "g2" = 6, "g3" = 5, "g4" = 5)) | ||||
15 | ``` |