blob: b89ad91795b96ee09384ce1aac1dae016e73b570 [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,
Hao Zhuac7e70f2017-08-02 00:18:36 -04008 label_row_css = "border-bottom: 1px solid;", latex_gap_space = "0.5em",
9 escape = TRUE)
Hao Zhubd95bb22017-05-22 16:08:49 -040010}
11\arguments{
Hao Zhu76281fe2017-07-03 19:33:09 -040012\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhubd95bb22017-05-22 16:08:49 -040013
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
17group starts. Note that the counting excludes header rows and other group
18labeling rows}
19
20\item{end_row}{A numeric value that tells the function in which row the group
21ends.}
22
23\item{label_row_css}{A character string for any customized css used for the
24labeling row. By default, the labeling row will have a solid black line
25underneath. Only useful for HTML documents.}
26
27\item{latex_gap_space}{A character value telling LaTeX how large the gap
28between the previous row and the group labeling row. Only useful for LaTeX
29documents.}
Hao Zhuac7e70f2017-08-02 00:18:36 -040030
31\item{escape}{A T/F value showing whether special characters should be
32escaped.}
Hao Zhu62cdde52017-05-20 22:16:03 -040033}
34\description{
Hao Zhubd95bb22017-05-22 16:08:49 -040035Group a few rows in a table together under a label.
Hao Zhu62cdde52017-05-20 22:16:03 -040036}
Hao Zhu78e61222017-05-24 20:53:35 -040037\examples{
38x <- knitr::kable(head(mtcars), "html")
39# Put Row 2 to Row 5 into a Group and label it as "Group A"
40group_rows(x, "Group A", 2, 5)
41
42}