powered by
This function adds p-values to a gtsummary table using the specified tests and separates the p-value footnotes.
add_pvalues(res, tests)
A gtsummary table object with p-values added and footnotes separated.
gtsummary
A gtsummary table object.
A list of tests to pass to gtsummary::add_p(), or TRUE to use default tests.
gtsummary::add_p()
TRUE
library(gtsummary) tbl <- trial %>% tbl_summary(by = trt) tbl <- add_pvalues(tbl, tests = TRUE)
Run the code above in your browser using DataLab