assign_tests {gtsummary} | R Documentation |
Assign Test
Description
This function is used to assign default tests for add_p()
and add_difference()
.
Usage
assign_tests(x, ...)
## S3 method for class 'tbl_summary'
assign_tests(
x,
include,
by = x$inputs$by,
test = NULL,
group = NULL,
adj.vars = NULL,
summary_type = x$inputs$type,
calling_fun = c("add_p", "add_difference"),
...
)
## S3 method for class 'tbl_svysummary'
assign_tests(
x,
include,
by = x$inputs$by,
test = NULL,
group = NULL,
adj.vars = NULL,
summary_type = x$inputs$type,
calling_fun = c("add_p", "add_difference"),
...
)
## S3 method for class 'tbl_continuous'
assign_tests(x, include, by, cont_variable, test = NULL, group = NULL, ...)
## S3 method for class 'tbl_survfit'
assign_tests(x, include, test = NULL, ...)
Arguments
x |
( |
... |
Passed to |
include |
( |
by |
( |
test |
(named |
group |
( |
adj.vars |
( |
summary_type |
(named |
calling_fun |
( |
cont_variable |
( |
Value
A table of class 'gtsummary'
Examples
trial |>
tbl_summary(
by = trt,
include = c(age, stage)
) |>
assign_tests(include = c("age", "stage"), calling_fun = "add_p")