Learn R Programming

matR (version 0.9.1)

rowstats: Apply selected significance test across rows

Description

Apply selected significance test across rows to grouped columns, with optional q-value calculation.

Usage

rowstats(x, ...)

# S3 method for matrix rowstats(x, groups, test=c("Kruskal-Wallis", "t-test-paired", "Wilcoxon-paired", "t-test-unpaired", "Mann-Whitney-unpaired-Wilcoxon", "ANOVA-one-way"), qvalue=FALSE, fdr.level=NULL, ...)

# S3 method for biom rowstats(x, groups, ...)

Arguments

x

a matrix-like object (matrix or biom)

groups

a grouping of columns (character or factor)

test

name of statistical test (character)

qvalue

perform qvalue calculation? (logical)

fdr.level

false-discovery rate parameter, passed to qvalue() (numeric)

unused

Value

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

Details

Complete technical documentation is forthcoming. For the current preliminary release, please refer to the examples provided.

See Also

stats::t.test, stats::wilcox.test, stats::kruskal.test, stats::anova

Examples

Run this code
# NOT RUN {
####  Kruskal test applied, for the case of more than two metagenome groups
columns (xx1, "host_common_name")
str (rowstats (xx1, groups="$$host_common_name", test="Kruskal"))

####  force a desired grouping of metagenomes
gg <- columns (xx2, "material") [[1]]
gg
levels (gg) <- levels (gg) [c(1,2,2)]
str (rowstats (xx2, groups=gg, test="t-test-unpaired"))
# }

Run the code above in your browser using DataLab