Skip to contents

Bold the p-values at or below a threshold, e.g. <0.05, in a table with a p.value column.

Usage

bold_p(x, t = 0.05, q = FALSE)

Arguments

x

(ltsummary)
An ltsummary object with a p.value column, e.g. after add_p().

t

(scalar numeric)
Threshold; p-values at or below it are shown in bold. Default is 0.05.

q

(scalar logical)
When TRUE, bold the q.value column instead of p.value. Default is FALSE.

Value

An ltsummary object.

Examples

# Example 1 ----------------------------------
trial |>
  tbl_summary(by = trt, include = c(response, marker, age), missing = "no") |>
  add_p() |>
  bold_p(t = 0.1)