More details see group_enrichment().

group_enrichment2(
  df,
  subset_var,
  grp_vars,
  enrich_vars,
  co_method = c("t.test", "wilcox.test"),
  ref_group = NA
)

Arguments

df

a data.frame.

subset_var

a column for subsetting.

grp_vars

character vector specifying group variables to split samples into subgroups (at least 2 subgroups, otherwise this variable will be skipped).

enrich_vars

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.

co_method

test method for continuous variable, default is 't.test'.

ref_group

reference group set in grp_vars.