to.incidence {hilldiv}R Documentation

Hill numbers computation

Description

Transform a count (OTU/ASV) table from abundance to incidence.

Usage

to.incidence(otutable, hierarchy, relative)

Arguments

otutable

A matrix/data.frame indicating the (relative) abundances of multiple samples. Columns must refer to samples and rows to OTUs/ASVs.

hierarchy

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

relative

Whether to transform the incidence vector or matrix to relative (0-1) values. Default: relative=FALSE.

Details

To incidence

Value

A vector of incidence data of a single system if no hierarchy table is specified and a matrix of incidence data of multiple systems if a hierarchy table is specified.

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.

See Also

hill_div, div_part

Examples

data(bat.diet.otutable)
data(bat.diet.hierarchy)
to.incidence(bat.diet.otutable)
to.incidence(bat.diet.otutable,bat.diet.hierarchy)
to.incidence(bat.diet.otutable,bat.diet.hierarchy,relative=TRUE)
to.incidence(otutable=bat.diet.otutable,hierarchy=bat.diet.hierarchy,relative=TRUE)

[Package hilldiv version 1.5.1 Index]