Hao Zhu | 8f41720 | 2017-05-20 16:37:14 -0400 | [diff] [blame] | 1 | % Generated by roxygen2: do not edit by hand |
| 2 | % Please edit documentation in R/add_indent.R |
| 3 | \name{add_indent} |
| 4 | \alias{add_indent} |
| 5 | \title{Add indentations to row headers} |
| 6 | \usage{ |
Damian Thomas | f36f960 | 2021-04-28 09:59:51 -0400 | [diff] [blame^] | 7 | add_indent( |
| 8 | kable_input, |
| 9 | positions, |
| 10 | level_of_indent = 1, |
| 11 | all_cols = FALSE, |
| 12 | target_cols = 1 |
| 13 | ) |
Hao Zhu | 8f41720 | 2017-05-20 16:37:14 -0400 | [diff] [blame] | 14 | } |
Hao Zhu | bd95bb2 | 2017-05-22 16:08:49 -0400 | [diff] [blame] | 15 | \arguments{ |
Hao Zhu | 76281fe | 2017-07-03 19:33:09 -0400 | [diff] [blame] | 16 | \item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified} |
Hao Zhu | bd95bb2 | 2017-05-22 16:08:49 -0400 | [diff] [blame] | 17 | |
| 18 | \item{positions}{A vector of numeric row numbers for the rows that need to |
| 19 | be indented.} |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame] | 20 | |
| 21 | \item{level_of_indent}{a numeric value for the indent level. Default is 1.} |
Hao Zhu | f2f4202 | 2020-08-18 22:48:52 -0400 | [diff] [blame] | 22 | |
| 23 | \item{all_cols}{T/F whether to apply indentation to all columns} |
Damian Thomas | f36f960 | 2021-04-28 09:59:51 -0400 | [diff] [blame^] | 24 | |
| 25 | \item{target_cols}{A vector of numeric column positions. Default is 1.} |
Hao Zhu | bd95bb2 | 2017-05-22 16:08:49 -0400 | [diff] [blame] | 26 | } |
Hao Zhu | 8f41720 | 2017-05-20 16:37:14 -0400 | [diff] [blame] | 27 | \description{ |
| 28 | Add indentations to row headers |
| 29 | } |
Hao Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 30 | \examples{ |
Hao Zhu | 9399dcc | 2020-08-26 17:27:38 -0400 | [diff] [blame] | 31 | \dontrun{ |
Hao Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 32 | x <- knitr::kable(head(mtcars), "html") |
| 33 | # Add indentations to the 2nd & 4th row |
Hao Zhu | 9410a27 | 2020-08-03 01:11:47 -0400 | [diff] [blame] | 34 | add_indent(x, c(2, 4), level_of_indent = 1) |
Hao Zhu | 9399dcc | 2020-08-26 17:27:38 -0400 | [diff] [blame] | 35 | } |
Hao Zhu | 78e6122 | 2017-05-24 20:53:35 -0400 | [diff] [blame] | 36 | |
| 37 | } |