gt_remove_stat | R Documentation |
A gtsummary wrapper function that takes a gtsummary object and removes a column from the table body by column name
A gtsummary wrapper function that takes a data frame and adds cross tabs by exposure and outcome
A function that adds mh odds ratio to an existing gtsummary object with same dimensions (will add to this later.)
gt_remove_stat(gts_object, col_name = "stat_0")
add_crosstabs(
data,
exposure,
outcome,
case_reference = "outcome",
var_name = NULL,
show_overall = TRUE,
exposure_label = NULL,
outcome_label = NULL,
var_label = NULL,
two_by_two = FALSE,
gt_statistic = "{n}",
show_N_header = FALSE
)
gt_mh_odds(
data,
exposure,
outcome,
strata,
exposure_label = NULL,
outcome_label = NULL,
strata_label = NULL
)
gts_object |
A data frame, passed by the gtsummary::add_stat function |
col_name |
the column name from the gtsummary object's table_body to remove |
data |
A data frame with linelist-style individual-level case data |
exposure |
column name to use as the exposure variable, must be logical class |
outcome |
column name to use as the outcome variable, must be logical class |
show_overall |
Logical argument to include overall column in gtsummary output; defaults to TRUE |
exposure_label |
label for exposure variable |
outcome_label |
label for outcome variable |
variable |
Name of a variable as the outcome of interest, passed by the gtsummary::add_stat function (e.g. illness) |
by |
Name of a variable for stratifying, passed by the gtsummary::add_stat function (e.g. illness). #'@param population the number of individuals in the population, passed to
|
... |
additional params that may be passed from gtsummary functions. |
a gtsummary object without the named column
gtsummary object with case and control counts tabulated by exposure, along with a crude overall odds ratio and odds using the Cochran-Mantel-Haenszel test with 95% confidence interval (https://cran.r-project.org/web/packages/samplesizeCMH/vignettes/samplesizeCMH-introduction.html)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.