powered by
Performs multiple mean comparisons for a data.frame
group_test( df, group, metadata = NULL, method = "wilcox.test", pattern = NULL, p.adjust.method = "none", threads = 1, verbose = TRUE )
data.frame
a data.frame
The compare group (categories) in your data, one column name of metadata when metadata exist or a vector whose length equal to columns number of df.
sample information dataframe contains group
the type of test. Default is wilcox.test. Allowed values include:
anova (parametric) and kruskal.test (non-parametric). Perform one-way ANOVA test comparing multiple groups.
anova
kruskal.test
chisq.test, performs chi-squared contingency table tests and goodness-of-fit tests.
chisq.test
'pearson', 'kendall', or 'spearman' (correlation), see cor.
cor
a named vector matching the group, e.g. c('G1'=1,'G2'=3,'G3'=2), use the correlation analysis with specific pattern to calculate p-value.
p.adjust.method, see p.adjust, default BH.
p.adjust
default 1
logical
data(otutab) group_test(otutab, metadata$Group, method = "kruskal.test") group_test(otutab[, 1:12], metadata$Group[1:12], method = "wilcox.test")
Run the code above in your browser using DataLab