blob: 69c55937947b150508e9418b1322ea52135e2905 [file] [log] [blame]
Hao Zhu8f417202017-05-20 16:37:14 -04001% 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 Thomasf36f9602021-04-28 09:59:51 -04007add_indent(
8 kable_input,
9 positions,
10 level_of_indent = 1,
11 all_cols = FALSE,
12 target_cols = 1
13)
Hao Zhu8f417202017-05-20 16:37:14 -040014}
Hao Zhubd95bb22017-05-22 16:08:49 -040015\arguments{
Hao Zhu76281fe2017-07-03 19:33:09 -040016\item{kable_input}{Output of \code{knitr::kable()} with \code{format} specified}
Hao Zhubd95bb22017-05-22 16:08:49 -040017
18\item{positions}{A vector of numeric row numbers for the rows that need to
19be indented.}
Hao Zhu9410a272020-08-03 01:11:47 -040020
21\item{level_of_indent}{a numeric value for the indent level. Default is 1.}
Hao Zhuf2f42022020-08-18 22:48:52 -040022
23\item{all_cols}{T/F whether to apply indentation to all columns}
Damian Thomasf36f9602021-04-28 09:59:51 -040024
25\item{target_cols}{A vector of numeric column positions. Default is 1.}
Hao Zhubd95bb22017-05-22 16:08:49 -040026}
Hao Zhu8f417202017-05-20 16:37:14 -040027\description{
28Add indentations to row headers
29}
Hao Zhu78e61222017-05-24 20:53:35 -040030\examples{
Hao Zhu9399dcc2020-08-26 17:27:38 -040031\dontrun{
Hao Zhu78e61222017-05-24 20:53:35 -040032x <- knitr::kable(head(mtcars), "html")
33# Add indentations to the 2nd & 4th row
Hao Zhu9410a272020-08-03 01:11:47 -040034add_indent(x, c(2, 4), level_of_indent = 1)
Hao Zhu9399dcc2020-08-26 17:27:38 -040035}
Hao Zhu78e61222017-05-24 20:53:35 -040036
37}