add_indent: Add indentations to row headers

Description Usage Arguments Examples

View source: R/add_indent.R

Description

Add indentations to row headers

Usage

1
add_indent(kable_input, positions, level_of_indent = 1, all_cols = FALSE)

Arguments

kable_input

Output of knitr::kable() with format specified

positions

A vector of numeric row numbers for the rows that need to be indented.

level_of_indent

a numeric value for the indent level. Default is 1.

all_cols

T/F whether to apply indentation to all columns

Examples

1
2
3
4
5
6
## Not run: 
x <- knitr::kable(head(mtcars), "html")
# Add indentations to the 2nd & 4th row
add_indent(x, c(2, 4), level_of_indent = 1)

## End(Not run)

kableExtra documentation built on Feb. 20, 2021, 9:10 a.m.