blob: 8e6db33d00f6f9dcca7759f932798f65a1a6ed6b [file] [log] [blame]
Hao Zhu62cdde52017-05-20 22:16:03 -04001% 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 Zhu49483bf2017-09-12 11:21:00 -04007group_rows(kable_input, group_label = NULL, start_row = NULL,
8 end_row = NULL, index = NULL,
9 label_row_css = "border-bottom: 1px solid;", latex_gap_space = "0.3em",
Hao Zhuac7e70f2017-08-02 00:18:36 -040010 escape = TRUE)
Hao Zhubd95bb22017-05-22 16:08:49 -040011}
12\arguments{
Hao Zhu76281fe2017-07-03 19:33:09 -040013\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhubd95bb22017-05-22 16:08:49 -040014
15\item{group_label}{A character string for the name of the group}
16
17\item{start_row}{A numeric value that tells the function in which row the
18group starts. Note that the counting excludes header rows and other group
19labeling rows}
20
21\item{end_row}{A numeric value that tells the function in which row the group
22ends.}
23
Hao Zhu49483bf2017-09-12 11:21:00 -040024\item{index}{A named vector providing the index for robust row-grouping tasks.
25Basically, you can use it in the same way as \code{add_header_above()}.}
26
Hao Zhubd95bb22017-05-22 16:08:49 -040027\item{label_row_css}{A character string for any customized css used for the
28labeling row. By default, the labeling row will have a solid black line
29underneath. Only useful for HTML documents.}
30
31\item{latex_gap_space}{A character value telling LaTeX how large the gap
32between the previous row and the group labeling row. Only useful for LaTeX
33documents.}
Hao Zhuac7e70f2017-08-02 00:18:36 -040034
35\item{escape}{A T/F value showing whether special characters should be
36escaped.}
Hao Zhu62cdde52017-05-20 22:16:03 -040037}
38\description{
Hao Zhubd95bb22017-05-22 16:08:49 -040039Group a few rows in a table together under a label.
Hao Zhu62cdde52017-05-20 22:16:03 -040040}
Hao Zhu78e61222017-05-24 20:53:35 -040041\examples{
42x <- knitr::kable(head(mtcars), "html")
43# Put Row 2 to Row 5 into a Group and label it as "Group A"
44group_rows(x, "Group A", 2, 5)
45
46}