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", |
| 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 |
| 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 | |
| 24 | \item{...}{extra variables for latex or html. For LaTeX table, you can have |
| 25 | a TRUE/FALSE option `full_midline` to control if the mid line needs to be |
| 26 | extended to the end of row.} |
Hao Zhu | 96a50b5 | 2017-06-14 18:09:35 -0400 | [diff] [blame] | 27 | } |
| 28 | \description{ |
Hao Zhu | 4f10f65 | 2017-06-16 14:03:44 -0400 | [diff] [blame^] | 29 | This function uses the same syntax as add_header_above. It will |
| 30 | add a heading column with grouped rows to the left side of the table. It can |
| 31 | act 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 |
| 33 | heading columns one by one. |
Hao Zhu | 96a50b5 | 2017-06-14 18:09:35 -0400 | [diff] [blame] | 34 | } |