Learn R Programming

gtsummary (version 1.2.0)

bold_p.tbl_summary: Bold significant p-values or q-values

Description

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

Usage

# S3 method for tbl_summary
bold_p(x, t = 0.05, q = FALSE, ...)

Arguments

x

Object created using tbl_summary function

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.

...

Not used

Value

A tbl_summary object

Example Output

See Also

Other tbl_summary tools: add_n, add_overall, add_p, add_q.tbl_summary, add_stat_label, bold_italicize_labels_levels, inline_text.tbl_summary, modify_header, sort_p.tbl_summary, tbl_summary

Examples

Run this code
# NOT RUN {
tbl_sum_bold_p_ex <-
  trial %>%
  dplyr::select(age, grade, response, trt) %>%
  tbl_summary(by = trt) %>%
  add_p() %>%
  bold_p()
# }

Run the code above in your browser using DataLab