Skip to contents

Update the alignment of columns in a table. The label column is left-aligned by default and every other column is centered.

Usage

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

Arguments

x

(ltsummary)
An ltsummary object.

columns

(selector)
Columns of x$table_body.

align

(string)
Column alignment, one of c("left", "right", "center").

Value

An ltsummary object.

Examples

# Example 1 ----------------------------------
trial |>
  tbl_summary(by = trt, include = c(age, grade)) |>
  modify_column_alignment(columns = all_stat_cols(), align = "right")