Add/Remove Indentation

modify_column_indent(
  x,
  columns,
  rows = NULL,
  double_indent = FALSE,
  undo = FALSE
)

Arguments

x

a gtsummary table

columns

columns to add indentation to

rows

predicate expression to select rows to indent. Default is NULL, indicating all rows

double_indent

logical indicating whether to double indent the cells. Default is FALSE for a single indentation

undo

logical indicating whether an indentation should be removed/undone. Default is FALSE

Value

a gtsummary table

Examples

# remove indentation from `tbl_summary()`
modify_column_indent_ex1 <-
  trial %>%
  select(grade) %>%
  tbl_summary() %>%
  modify_column_indent(columns = label, undo = TRUE)