Added some documentation for new features
diff --git a/docs/awesome_table_in_html.Rmd b/docs/awesome_table_in_html.Rmd
index dfb0f80..a98ca1e 100644
--- a/docs/awesome_table_in_html.Rmd
+++ b/docs/awesome_table_in_html.Rmd
@@ -18,14 +18,11 @@
The goal of `kableExtra` is to help you build common complex tables and manipulate table styles. It imports the pipe `%>%` symbol from `magrittr` and verbalize all the functions, so basically you can add "layers" to a kable output in a way that is similar with `ggplot2` and `plotly`.
# Installation
-Some LaTeX features in `kableExtra`, such as striped line, requires rmarkdown 1.4.0+, which is not yet on CRAN. It is highly recommended to install the dev version of rmarkdown before you try this package. If you only use this package for HTML table, it doesn't matter what version of rmarkdown you are using.
```r
-# install.packages("devtools")
-devtools::install_github("rstudio/rmarkdown")
-
install.packages("kableExtra")
# For dev version
+# install.packages("devtools")
devtools::install_github("haozhu233/kableExtra")
```
# Getting Started
@@ -161,3 +158,32 @@
"Group 2 contains hp, drat and wt"),
notation = "symbol")
```
+
+---
+
+The following features are introduced in `kableExtra` 0.2.0.
+
+# Group Rows
+Sometimes we want a few rows of the table being grouped together. They might be items under the same topic (e.g., animals in one species) or just different data groups for a categorical variable (e.g., age < 40, age > 40). With the new function `group_rows()` in `kableExtra`, this kind of task can be completed in one line. Please see the example below. Note that when you count for the start/end rows of the group, you don't need to count for the header rows nor other group label rows. You only need to think about the row numbers in the "original R dataframe".
+```{r}
+kable(mtcars[1:10, 1:6], format = "html", caption = "Group Rows") %>%
+ kable_styling("striped", full_width = F) %>%
+ group_rows("Group 1", 4, 7) %>%
+ group_rows("Group 2", 8, 10)
+```
+
+For advanced users, you can even define your own css for the group labeling.
+```{r}
+kable(dt, format = "html") %>%
+ kable_styling("striped", full_width = F) %>%
+ group_rows("Group 1", 3, 5, label_row_css = "background-color: #666; color: #fff;")
+```
+
+# Add indentation
+Unlike `group_rows()`, which will insert a labeling row, sometimes we want to list a few sub groups under a total one. In that case, `add_indent()` is probably more apporiate.
+For advanced users, you can even define your own css for the group labeling.
+```{r}
+kable(dt, format = "html") %>%
+ kable_styling("striped", full_width = F) %>%
+ add_indent(c(1, 3, 5))
+```