add_indent: Add indentations to left column row headers

View source: R/compile-post.R

add_indentR Documentation

Add indentations to left column row headers

Description

Add indentations to left column row headers. Note: will only work on cell_header cells.

Usage

add_indent(table, amounts = 2, rows = NULL, columns = NULL)

Arguments

table

Output of tangram::tangram()

amounts

numeric; Specifies number of spaces to add. A vector that is either a single value or vector of the same size as the height of the table. If positions is specified then it must be the same length. Defaults to 2, which each pair of spaces converts naturally in rendering to HTML, LaTeX, etc..

rows

numeric; A vector of numeric row numbers for the rows that need to be indented. Defaults to NULL which indents all.

columns

numeric; Column to apply indent to, defaults to 1

Value

the modified table

Examples

x <- tangram(drug ~ bili + albumin, pbc)
add_indent(x)
add_indent(x, amounts=10)
add_indent(x, amounts=c(0, 0, 2, 4))
add_indent(x, rows=c(3))
add_indent(x, rows=c(3, 4), amounts=c(4, 2))

tangram documentation built on Feb. 16, 2023, 5:59 p.m.