This function adds p-values to a gtsummary table using the specified tests and separates the p-value footnotes.

add_pvalues(res, tests)

Arguments

res

A gtsummary table object.

tests

A list of tests to pass to gtsummary::add_p(), or TRUE to use default tests.

Value

A gtsummary table object with p-values added and footnotes separated.

Examples

if (FALSE) { # \dontrun{
library(gtsummary)
tbl <- trial %>% tbl_summary(by = trt)
tbl <- add_pvalues(tbl, tests = TRUE)
} # }