More details see group_enrichment()
.
group_enrichment2(
df,
subset_var,
grp_vars,
enrich_vars,
co_method = c("t.test", "wilcox.test"),
ref_group = NA
)
a data.frame
.
a column for subsetting.
character vector specifying group variables to split samples into subgroups (at least 2 subgroups, otherwise this variable will be skipped).
character vector specifying measure variables to be compared.
If variable is not numeric, only binary cases are accepted in the form of
TRUE/FALSE
or P/N
(P for positive cases and N for negative cases).
Of note, NA
values set to negative cases.
test method for continuous variable, default is 't.test'.
reference group set in grp_vars
.