# S3 method for tbl_continuous add_p( x, test = NULL, pvalue_fun = NULL, include = everything(), test.args = NULL, group = NULL, ... )
Object with class
tbl_summary from the tbl_summary function
List of formulas specifying statistical tests to perform for each
Default is two-way ANOVA when
by= is not
NULL, and has the same defaults
by = NULL.
See tests for details, more tests, and instruction for implementing a custom test.
Function to round and format p-values.
Default is style_pvalue.
The function must have a numeric vector input (the numeric, exact p-value),
and return a string that is the rounded/formatted p-value (e.g.
pvalue_fun = function(x) style_pvalue(x, digits = 2) or equivalently,
purrr::partial(style_pvalue, digits = 2)).
Variables to include in output. Input may be a vector of
quoted variable names, unquoted variable names, or tidyselect select helper
functions. Default is
List of formulas containing additional arguments to pass to
tests that accept arguments. For example, add an argument for all t-tests,
test.args = all_tests("t.test") ~ list(var.equal = TRUE)
Column name (unquoted or quoted) of an ID or grouping variable.
The column can be used to calculate p-values with correlated data.
NULL. See tests for methods that utilize the
Other tbl_continuous tools:
add_p_continuous_ex1 <- tbl_continuous( data = trial, variable = age, by = trt, include = grade ) %>% add_p()