add_indent: Add indentations to left column row headers

Description Usage Arguments Value Examples

View source: R/compile-post.R

Description

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

Usage

1
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

1
2
3
4
5
6
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 June 5, 2018, 1:04 a.m.