Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add_indent

Add indentations to row headers


Description

Add indentations to row headers

Usage

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

## 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

Construct Complex Table with 'kable' and Pipe Syntax

v1.3.4
MIT + file LICENSE
Authors
Hao Zhu [aut, cre] (<https://orcid.org/0000-0002-3386-6076>), Thomas Travison [ctb], Timothy Tsai [ctb], Will Beasley [ctb], Yihui Xie [ctb], GuangChuang Yu [ctb], Stéphane Laurent [ctb], Rob Shepherd [ctb], Yoni Sidi [ctb], Brian Salzer [ctb], George Gui [ctb], Yeliang Fan [ctb], Duncan Murdoch [ctb], Bill Evans [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.