blob: 827530935dbe499851c1ed481a262af8447c6c07 [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 Zhubd95bb22017-05-22 16:08:49 -04007group_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{
Hao Zhu76281fe2017-07-03 19:33:09 -040011\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhubd95bb22017-05-22 16:08:49 -040012
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
16group starts. Note that the counting excludes header rows and other group
17labeling rows}
18
19\item{end_row}{A numeric value that tells the function in which row the group
20ends.}
21
22\item{label_row_css}{A character string for any customized css used for the
23labeling row. By default, the labeling row will have a solid black line
24underneath. Only useful for HTML documents.}
25
26\item{latex_gap_space}{A character value telling LaTeX how large the gap
27between the previous row and the group labeling row. Only useful for LaTeX
28documents.}
Hao Zhu62cdde52017-05-20 22:16:03 -040029}
30\description{
Hao Zhubd95bb22017-05-22 16:08:49 -040031Group a few rows in a table together under a label.
Hao Zhu62cdde52017-05-20 22:16:03 -040032}
Hao Zhu78e61222017-05-24 20:53:35 -040033\examples{
34x <- knitr::kable(head(mtcars), "html")
35# Put Row 2 to Row 5 into a Group and label it as "Group A"
36group_rows(x, "Group A", 2, 5)
37
38}