calcDiv {chemodiv}R Documentation

Calculate various diversity measures

Description

Function to calculate different common measures of diversity, and components (richness, evenness, disparity) thereof. Types of measures that can be calculated includes Hill diversity, Functional Hill diversity, Mean Pairwise Dissimilarity (MPD), Shannon's diversity, Simpson diversity, Rao's Q, Pielou's evenness and Hill evenness.

Usage

calcDiv(sampleData, compDisMat = NULL, type = "HillDiv", q = 1)

Arguments

sampleData

Data frame with the relative concentration of each compound (column) in every sample (row).

compDisMat

Compound dissimilarity matrix, as calculated by compDis. Has to be supplied for calculations of Functional Hill Diversity and Rao's Q.

type

Type(s) of diversity or component(s) thereof to calculate. Any of "Shannon", "Simpson", "HillDiv", "FuncHillDiv", "MPD", "RaoQ", "PielouEven", "HillEven".

q

Diversity order to use for Hill diversity, Functional Hill Diversity and Hill Evenness. q should be equal to or larger than zero. This parameter determines the sensitivity of the (Functional) Hill Diversity measure to the relative frequencies of compounds. Commonly set to 0, 1 or 2, although any value > 0 may be used. For q = 0 compound proportions are not taken into account. For q = 1 (default) compounds are weighed according to their proportion in the sample. For q = 2, more weight is put on compounds with high proportions.

Details

The function calculates diversity and/or components thereof for each sample in sampleData. It can calculate the following indices:

Value

Data frame with calculated diversity values for each sample.

References

Chao A, Chiu C-H, Jost L. 2014. Unifying Species Diversity, Phylogenetic Diversity, Functional Diversity, and Related Similarity and Differentiation Measures Through Hill Numbers. Annual Review of Ecology, Evolution, and Systematics 45: 297-324.

Chiu C-H, Chao A. 2014. Distance-Based Functional Diversity Measures and Their Decomposition: A Framework Based on Hill Numbers. PLoS ONE 9: e100014.

Hill MO. 1973. Diversity and Evenness: A Unifying Notation and Its Consequences. Ecology 54: 427-432.

Petren H, Koellner TG, Junker RR. 2023. Quantifying chemodiversity considering biochemical and structural properties of compounds with the R package chemodiv. New Phytologist 237: 2478-2492.

Petren H, Anaia RA, Aragam KS, Braeutigam A, Eckert S, Heinen R, Jakobs R, Ojeda L, Popp M, Sasidharan R, Schnitzler J-P, Steppuhn A, Thon F, Tschikin S, Unsicker SB, van Dam NM, Weisser WW, Wittmann MJ, Yepes S, Ziaja D, Meuller C, Junker RR. 2023. Understanding the phytochemical diversity of plants: Quantification, variation and ecological function. bioRxiv doi: 10.1101/2023.03.23.533415.

Tuomisto H. 2012. An updated consumer's guide to evenness and related indices. Oikos 121: 1203-1218

Examples

data(minimalSampData)
data(minimalCompDis)
calcDiv(sampleData = minimalSampData)
calcDiv(sampleData = minimalSampData, type = c("HillDiv", "HillEven"))
calcDiv(sampleData = minimalSampData, compDisMat = minimalCompDis,
type = "FuncHillDiv", q = 2)

data(alpinaSampData)
data(alpinaCompDis)
calcDiv(sampleData = alpinaSampData, compDisMat = alpinaCompDis,
type = "FuncHillDiv")

[Package chemodiv version 0.3.0 Index]