dunnT: Dunn's Test for multiple variables

View source: R/dunnT.R

dunnTR Documentation

Dunn's Test for multiple variables

Description

This function make use of dunn.test function to compute Dunn's test of multiple comparisons along groups (using rank sums) and looping it along multiple variables of interest (e.g., alpha diversity indexes).

Usage

dunnT(data, numberOfIndexes, formula, dunn.options, method = "BH")

Arguments

data

a data frame, columns corresponding to indexes and rows corresponding to samples. Further columns should be included with metadata. This is used in argument formula. Further details to be found in dunn.test.

numberOfIndexes

Integer corresponding to the number of indexes to analyze. This will be taken as column numbers by the function.

formula

Metadata group name. This will group samples according to a metadata column (corresponding to g argument in dunn.test, representing grouping vector or factor).

dunn.options

Further arguments to be passed to dunn.test

method

Method selected to adjust the p-values for multiple comparisons. See dunn.test for more detailes about methods and abbreviations. Default is set to Benjamini-Hochberg adjustment ("BH")

Value

Returns a data frame with dunn.test results for all pairwise comparisons, performed on each variable (determined by numberOfIndexes).For further details on parameters, check dunn.test.

Examples

dunn_location <- dunnT(alpha_diversity_table,4,"location")



nuriamw/micro4all documentation built on May 2, 2024, 9:18 a.m.