group_test: Performs multiple mean comparisons for a data.frame

group_testR Documentation

Performs multiple mean comparisons for a data.frame

Description

Performs multiple mean comparisons for a data.frame

Usage

group_test(
  df,
  group,
  metadata = NULL,
  method = "wilcox.test",
  threads = 1,
  p.adjust.method = "BH",
  verbose = TRUE
)

Arguments

df

a data.frame

group

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.

metadata

sample information dataframe contains group

method

the type of test. Default is wilcox.test. Allowed values include:

  • t.test (parametric) and wilcox.test (non-parametric). Perform comparison between two groups of samples. If the grouping variable contains more than two levels, then a pairwise comparison is performed.

  • anova (parametric) and kruskal.test (non-parametric). Perform one-way ANOVA test comparing multiple groups.

threads

default 1

p.adjust.method

p.adjust.method, see p.adjust, default BH.

verbose

logical

Value

data.frame

Examples

data(otutab)
group_test(otutab, metadata$Group, method = "kruskal.test")
group_test(otutab[, 1:12], metadata$Group[1:12], method = "wilcox.test")

pcutils documentation built on June 26, 2024, 1:06 a.m.