Hao Zhu | 96a50b5 | 2017-06-14 18:09:35 -0400 | [diff] [blame] | 1 | % 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 Zhu | 4f10f65 | 2017-06-16 14:03:44 -0400 | [diff] [blame] | 5 | \title{Add a heading column to the left side of the table} |
Hao Zhu | 96a50b5 | 2017-06-14 18:09:35 -0400 | [diff] [blame] | 6 | \usage{ |
Hao Zhu | 4f10f65 | 2017-06-16 14:03:44 -0400 | [diff] [blame] | 7 | add_header_left(kable_input, header = NULL, header_name = "", align = "c", |
Hao Zhu | 32f43f7 | 2017-06-20 18:24:54 -0400 | [diff] [blame] | 8 | width = NULL, bold = F, italic = F, full_midline) |
Hao Zhu | 4f10f65 | 2017-06-16 14:03:44 -0400 | [diff] [blame] | 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 |
| 14 | example, `c("xxx" = 1, "title" = 2)` can be used to create a new header column |
| 15 | for a 3-row table with "xxx" spanning row 1 and "title" spanning row 2 & 3 ( |
| 16 | two 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 | |
Hao Zhu | 32f43f7 | 2017-06-20 18:24:54 -0400 | [diff] [blame] | 24 | \item{width}{A character string for the width of the new column. Values |
| 25 | could be "10cm", "3in" or "30em", etc..} |
| 26 | |
| 27 | \item{bold}{A T/F value to control whether the text should be bolded.} |
| 28 | |
| 29 | \item{italic}{A T/F value to control whether the text should to be emphasized.} |
| 30 | |
| 31 | \item{full_midline}{This option currently only work in LaTeX. It's a |
| 32 | TRUE/FALSE option to control if the mid line needs to be extended to the end |
| 33 | of row.} |
Hao Zhu | 96a50b5 | 2017-06-14 18:09:35 -0400 | [diff] [blame] | 34 | } |
| 35 | \description{ |
Hao Zhu | 4f10f65 | 2017-06-16 14:03:44 -0400 | [diff] [blame] | 36 | This function uses the same syntax as add_header_above. It will |
| 37 | add a heading column with grouped rows to the left side of the table. It can |
| 38 | act as an alternative way to `group_rows` to show grouped information. As |
| 39 | `add_header_above`, users can use this function to add multiple layers of |
| 40 | heading columns one by one. |
Hao Zhu | 96a50b5 | 2017-06-14 18:09:35 -0400 | [diff] [blame] | 41 | } |