Add examples to the doc site
diff --git a/docs/awesome_table_in_pdf.Rmd b/docs/awesome_table_in_pdf.Rmd
index 351686b..f75b87c 100644
--- a/docs/awesome_table_in_pdf.Rmd
+++ b/docs/awesome_table_in_pdf.Rmd
@@ -252,3 +252,17 @@
row_spec(5, bold = T)
```
+# Collapse Rows in Selected Columns
+Function `group_rows` is great for showing simple structural information on rows but sometimes people may need to show structural information with multiple layers. When it happens, you may consider to use `collapse_rows` instead, which will put repeating cells in columns into multi-row cells.
+
+```{r}
+collapse_rows_dt <- data.frame(C1 = c(rep("a", 10), rep("b", 5)),
+ C2 = c(rep("c", 7), rep("d", 3), rep("c", 2), rep("d", 3)),
+ C3 = 1:15,
+ C4 = sample(c(0,1), 15, replace = TRUE))
+head(collapse_rows_dt)
+kable(collapse_rows_dt, "latex", booktabs = T, align = "c") %>%
+ column_spec(1, bold=T) %>%
+ collapse_rows(columns = 1:2)
+```
+