| 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, | 
| Hao Zhu | ac7e70f | 2017-08-02 00:18:36 -0400 | [diff] [blame] | 8 | label_row_css = "border-bottom: 1px solid;", latex_gap_space = "0.5em", | 
|  | 9 | escape = TRUE) | 
| Hao Zhu | bd95bb2 | 2017-05-22 16:08:49 -0400 | [diff] [blame] | 10 | } | 
|  | 11 | \arguments{ | 
| Hao Zhu | 76281fe | 2017-07-03 19:33:09 -0400 | [diff] [blame] | 12 | \item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified} | 
| Hao Zhu | bd95bb2 | 2017-05-22 16:08:49 -0400 | [diff] [blame] | 13 |  | 
|  | 14 | \item{group_label}{A character string for the name of the group} | 
|  | 15 |  | 
|  | 16 | \item{start_row}{A numeric value that tells the function in which row the | 
|  | 17 | group starts. Note that the counting excludes header rows and other group | 
|  | 18 | labeling rows} | 
|  | 19 |  | 
|  | 20 | \item{end_row}{A numeric value that tells the function in which row the group | 
|  | 21 | ends.} | 
|  | 22 |  | 
|  | 23 | \item{label_row_css}{A character string for any customized css used for the | 
|  | 24 | labeling row. By default, the labeling row will have a solid black line | 
|  | 25 | underneath. Only useful for HTML documents.} | 
|  | 26 |  | 
|  | 27 | \item{latex_gap_space}{A character value telling LaTeX how large the gap | 
|  | 28 | between the previous row and the group labeling row. Only useful for LaTeX | 
|  | 29 | documents.} | 
| Hao Zhu | ac7e70f | 2017-08-02 00:18:36 -0400 | [diff] [blame] | 30 |  | 
|  | 31 | \item{escape}{A T/F value showing whether special characters should be | 
|  | 32 | escaped.} | 
| Hao Zhu | 62cdde5 | 2017-05-20 22:16:03 -0400 | [diff] [blame] | 33 | } | 
|  | 34 | \description{ | 
| Hao Zhu | bd95bb2 | 2017-05-22 16:08:49 -0400 | [diff] [blame] | 35 | Group a few rows in a table together under a label. | 
| Hao Zhu | 62cdde5 | 2017-05-20 22:16:03 -0400 | [diff] [blame] | 36 | } | 
| Hao Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 37 | \examples{ | 
|  | 38 | x <- knitr::kable(head(mtcars), "html") | 
|  | 39 | # Put Row 2 to Row 5 into a Group and label it as "Group A" | 
|  | 40 | group_rows(x, "Group A", 2, 5) | 
|  | 41 |  | 
|  | 42 | } |