bold_p: Bold significant p-values or q-values

Description Usage Arguments Example Output Author(s) Examples

View source: R/bold_p.R

Description

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

Usage

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

Arguments

x

Object created using gtsummary functions

t

Threshold below which values will be bold. Default is 0.05.

q

Logical argument. When TRUE will bold the q-value column rather than the p-values. Default is FALSE.

Example Output

Example 1

Example 2

Author(s)

Daniel D. Sjoberg, Esther Drill

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Example 1 ----------------------------------
bold_p_ex1 <-
  trial[c("age", "grade", "response", "trt")] %>%
  tbl_summary(by = trt) %>%
  add_p() %>%
  bold_p(t = 0.65)

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

ddsjoberg/gtsummary documentation built on April 8, 2021, 5:48 a.m.