modify_column_alignment: Modify Column Alignment

View source: R/modify_column_alignment.R

modify_column_alignmentR Documentation

Modify Column Alignment

Description

\lifecycle

maturing Update column alignment/justification in a gtsummary table.

Usage

modify_column_alignment(x, columns, align = c("left", "right", "center"))

Arguments

x

gtsummary object

columns

vector or selector of columns in x$table_body

align

string indicating alignment of column, must be one of c("left", "right", "center")

See Also

Review list, formula, and selector syntax used throughout gtsummary

Other Advanced modifiers: modify_cols_merge(), modify_column_hide(), modify_column_indent(), modify_fmt_fun(), modify_table_body(), modify_table_styling()

Examples

# Example 1 ----------------------------------
tbl <-
  lm(age ~ marker + grade, trial) %>%
  tbl_regression() %>%
  modify_column_alignment(columns = everything(), align = "left")

gtsummary documentation built on April 26, 2022, 1:05 a.m.