DA.TukeyHSD: Run 'TukeyHSD' on all features from 'DAtest' results with...

View source: R/posthocs.R

DA.TukeyHSDR Documentation

Run TukeyHSD on all features from DAtest results with allResults = TRUE

Description

Works on "aov", "lao", "lao2", "aoc", "aoa"

Usage

DA.TukeyHSD(results, variable = "predictor", p.adj = "fdr", ...)

Arguments

results

Output from a DA."test" function with allResults = TRUE

variable

Which variable to test. Default predictor. Alternatively, the name of a covar

p.adj

P-value adjustment method. See p.adjust for details

...

Additional arguments for TukeyHSD function

Value

A data.frame with output from TukeyHSD and adjusted p.values for each predictor and feature

Examples

# Creating random count_table and predictor
set.seed(5)
mat <- matrix(rnbinom(3000, size = 0.1, mu = 500), nrow = 100, ncol = 30)
rownames(mat) <- 1:100
pred <- c(rep("A", 10), rep("B", 10), rep("C", 10))

# Run anova and then TukeyHSD on each predictor
res <- DA.aov(data = mat, predictor = pred, allResults = TRUE)
res.tuk <- DA.TukeyHSD(res)

Russel88/DAtest documentation built on March 24, 2022, 3:50 p.m.