modify_indent: Modify column indentation

View source: R/modify_indent.R

modify_indentR Documentation

Modify column indentation

Description

Add, increase, or reduce indentation for columns.

Usage

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

Arguments

x

(gtsummary)
A gtsummary object

columns

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

rows

(predicate expression)
Predicate expression to select rows in x$table_body. Review rows argument details.

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_indent(columns = label, indent = 0L)

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

gtsummary documentation built on Aug. 9, 2025, 1:08 a.m.