div_profile {hilldiv}R Documentation

Diversity profile

Description

Create diversity profile vectors (single sample or system) or tables (multiple samples or groups) from count tables.

Usage

div_profile(count, qvalues, tree, hierarchy, level)

Arguments

count

A vector or a matrix indicating the (relative) OTU/ASV counts of one or multiple samples. If a matrix is provided, columns must refer to samples and rows to OTUs.

qvalues

A vector of sequential orders of diversity (default from 0 to 5). order=seq(from = 0, to = 5, by = (0.1))

tree

A tree of class 'phylo'. The tip labels must match the names of the vector values (if one sample) or matrix rows (if multiple samples).

hierarchy

A two-column matrix indicating the relation between samples (first column) and groups (second column).

level

Whether to compute alpha or gamma diversities of the system or the groups specified in the hierarchy table.

Details

Diversity profile

Value

A vector or matrix containing diversity values at different orders of diversity (as specified in qvalues).

Author(s)

Antton Alberdi, anttonalberdi@gmail.com

References

Alberdi, A., Gilbert, M.T.P. (2019). A guide to the application of Hill numbers to DNA-based diversity analyses. Molecular Ecology Resources, 19, 804-817.

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.

See Also

div_profile_plot, hill_div

Examples

data(bat.diet.otutable)
data(bat.diet.tree)
data(bat.diet.hierarchy)
#One sample example
bat.diet.sample <- bat.diet.otutable[,1]
div_profile(count=bat.diet.sample,qvalues=seq(from = 0, to = 5, by = (0.1)))
#One sample example (phylogenetic Hill numbers)
names(bat.diet.sample) <- rownames(bat.diet.otutable)
div_profile(count=bat.diet.sample,qvalues=seq(from = 0, to = 5, by = (0.1)),tree=bat.diet.tree)
#Multiple samples
div_profile(bat.diet.otutable)
#Multiple groups (gamma diversity)
div_profile(bat.diet.otutable,hierarchy=bat.diet.hierarchy,level="gamma")
#Multiple groups (alpha diversity)
div_profile(bat.diet.otutable,hierarchy=bat.diet.hierarchy,level="alpha")

[Package hilldiv version 1.5.1 Index]