Skip to contents

Bold or italicize the variable labels or the variable levels of a table. bold_labels() and italicize_labels() format the rows with row_type == "label"; bold_levels() and italicize_levels() format every other row of the first visible column, which includes the level and missing-value rows of a tbl_summary table.

Usage

bold_labels(x)

bold_levels(x)

italicize_labels(x)

italicize_levels(x)

# S3 method for class 'ltsummary'
bold_labels(x)

# S3 method for class 'ltsummary'
bold_levels(x)

# S3 method for class 'ltsummary'
italicize_labels(x)

# S3 method for class 'ltsummary'
italicize_levels(x)

Arguments

x

(ltsummary)
An ltsummary object.

Value

An ltsummary object of the same class as x.

Examples

# Example 1 ----------------------------------
trial |>
  tbl_summary(include = c(trt, age, response)) |>
  bold_labels() |>
  italicize_levels()
# Example 2 ---------------------------------- # formatting combines trial |> tbl_summary(by = trt, include = grade) |> bold_labels() |> italicize_labels() |> bold_levels()