bold_p: Bold significant p-values

View source: R/bold_p.R

bold_pR Documentation

Bold significant p-values

Description

Bold values below a chosen threshold (e.g. <0.05) in a gtsummary tables.

Usage

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

Arguments

x

(gtsummary)
Object created using gtsummary functions

t

(scalar numeric)
Threshold below which values will be bold. Default is 0.05.

q

(scalar logical)
When TRUE will bold the q-value column rather than the p-value. Default is FALSE.

Author(s)

Daniel D. Sjoberg, Esther Drill

Examples

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

# Example 2 ----------------------------------
glm(response ~ trt + grade, trial, family = binomial(link = "logit")) |>
  tbl_regression(exponentiate = TRUE) |>
  bold_p(t = 0.65)

gtsummary documentation built on Oct. 5, 2024, 1:06 a.m.