modify_column_indent: Modify column indentation

View source: R/modify_column_indent.R

modify_column_indentR Documentation

Modify column indentation

Description

Add, increase, or reduce indentation for columns.

Usage

modify_column_indent(x, columns, rows = NULL, indent = 4L, double_indent, undo)

Arguments

x

(gtsummary)
gtsummary object

columns

(tidy-select)
Selector of columns in x$table_body

rows

(predicate expression)
Predicate expression to select rows in x$table_body. Can be used to style footnote, formatting functions, missing symbols, and text formatting. Default is NULL. See details below.

indent

(integer)
An integer indicating how many space to indent text

double_indent, undo

[Deprecated]

Value

a gtsummary table

See Also

Other Advanced modifiers: modify_column_merge(), modify_table_styling()

Examples

# remove indentation from `tbl_summary()`
trial |>
  tbl_summary(include = grade) |>
  modify_column_indent(columns = label, indent = 0L)

# increase indentation in `tbl_summary`
trial |>
  tbl_summary(include = grade) |>
  modify_column_indent(columns = label, rows = !row_type %in% 'label', indent = 8L)

gtsummary documentation built on Oct. 5, 2024, 1:06 a.m.