Hao Zhu | 62cdde5 | 2017-05-20 22:16:03 -0400 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/group_rows.R |
| 3 | \name{group_rows} |
| 4 | \alias{group_rows} |
| 5 | \title{Put a few rows of a table into one category} |
| 6 | \usage{ |
Hao Zhu | bd95bb2 | 2017-05-22 16:08:49 -0400 | [diff] [blame] | 7 | group_rows(kable_input, group_label, start_row, end_row, |
| 8 | label_row_css = "border-bottom: 1px solid;", latex_gap_space = "0.5em") |
| 9 | } |
| 10 | \arguments{ |
| 11 | \item{kable_input}{Output of `knitr::kable()` with `format` specified} |
| 12 | |
| 13 | \item{group_label}{A character string for the name of the group} |
| 14 | |
| 15 | \item{start_row}{A numeric value that tells the function in which row the |
| 16 | group starts. Note that the counting excludes header rows and other group |
| 17 | labeling rows} |
| 18 | |
| 19 | \item{end_row}{A numeric value that tells the function in which row the group |
| 20 | ends.} |
| 21 | |
| 22 | \item{label_row_css}{A character string for any customized css used for the |
| 23 | labeling row. By default, the labeling row will have a solid black line |
| 24 | underneath. Only useful for HTML documents.} |
| 25 | |
| 26 | \item{latex_gap_space}{A character value telling LaTeX how large the gap |
| 27 | between the previous row and the group labeling row. Only useful for LaTeX |
| 28 | documents.} |
Hao Zhu | 62cdde5 | 2017-05-20 22:16:03 -0400 | [diff] [blame] | 29 | } |
| 30 | \description{ |
Hao Zhu | bd95bb2 | 2017-05-22 16:08:49 -0400 | [diff] [blame] | 31 | Group a few rows in a table together under a label. |
Hao Zhu | 62cdde5 | 2017-05-20 22:16:03 -0400 | [diff] [blame] | 32 | } |
Hao Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 33 | \examples{ |
| 34 | x <- knitr::kable(head(mtcars), "html") |
| 35 | # Put Row 2 to Row 5 into a Group and label it as "Group A" |
| 36 | group_rows(x, "Group A", 2, 5) |
| 37 | |
| 38 | } |