blob: 54515a4c0089d31d0592f2622032353bbc3ca0c0 [file] [log] [blame]
Hao Zhu96a50b52017-06-14 18:09:35 -04001% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/add_header_left.R
3\name{add_header_left}
4\alias{add_header_left}
Hao Zhu4f10f652017-06-16 14:03:44 -04005\title{Add a heading column to the left side of the table}
Hao Zhu96a50b52017-06-14 18:09:35 -04006\usage{
Hao Zhu4f10f652017-06-16 14:03:44 -04007add_header_left(kable_input, header = NULL, header_name = "", align = "c",
8 ...)
9}
10\arguments{
11\item{kable_input}{Output of `knitr::kable()` with `format` specified}
12
13\item{header}{A (named) character vector with `rowspan` as values. For
14example, `c("xxx" = 1, "title" = 2)` can be used to create a new header column
15for a 3-row table with "xxx" spanning row 1 and "title" spanning row 2 & 3 (
16two rows). For convenience, when `rowspan` equals to 1, users can drop the
17` = 1` part. As a result, `c("xxx", "title" = 2)` is the same as
18`c("xxx" = 1, "title" = 2)`.}
19
20\item{header_name}{Column name that that extra column}
21
22\item{align}{Column alignment. you can choose from "c", "l" or "r"}
23
24\item{...}{extra variables for latex or html. For LaTeX table, you can have
25a TRUE/FALSE option `full_midline` to control if the mid line needs to be
26extended to the end of row.}
Hao Zhu96a50b52017-06-14 18:09:35 -040027}
28\description{
Hao Zhu4f10f652017-06-16 14:03:44 -040029This function uses the same syntax as add_header_above. It will
30add a heading column with grouped rows to the left side of the table. It can
31act as an alternative way to `group_rows` to show grouped information. As
32`add_header_above`, users can use this function to add multiple layers of
33heading columns one by one.
Hao Zhu96a50b52017-06-14 18:09:35 -040034}