div_part {hilldiv} | R Documentation |
Multi-level diversity partitioning
Description
Multi-level diversity partitioning following the multiplicative definition based on Hill numbers. Hierarchical levels are defined from L1 (minimum, sample) to Ln (maximum, whole system), and as many intermediate levels as wanted can be defined in between. The hierarchical structure of the system is defined with the hierarchy table. If no hierarchy table is inputed, the function yields a simple two-level partitioning between alpha (L1), beta and gamma (L2).
Usage
div_part(countable, qvalue, tree, hierarchy)
Arguments
countable |
A count table (matrix/data.frame) indicating the absolute or relative OTU/ASV abundances of multiple samples. Columns must refer to samples and rows to OTUs/ASVs. |
qvalue |
A positive number, usually between 0 and 5, but most commonly 0, 1 or 2. It can be an integer or contain decimals. |
tree |
A phylogenetic tree of class 'phylo'. The tip labels must match the row names in the OTU table. Use the function match_data() if the OTU names do not match. |
hierarchy |
A matrix indicating the relation between samples (first column) and parent group(s). |
Details
Multi-level diversity partitioning (based on Hill numbers)
Value
A list object containing details of hierarchical diversity partitioning.
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., & Hsieh, T. C. (2012). Proposing a resolution to debates on diversity partitioning. Ecology, 93, 2037-2051.
Jost, L. (2007). Partitioning diversity into independent alpha and beta components. Ecology, 88, 2427–2439.
See Also
div_part
, gamma_div
, match_data
Examples
data(bat.diet.otutable)
data(bat.diet.tree)
data(bat.diet.hierarchy)
#Two level examples (L1=sample (alpha diversity), L2=whole system (gamma diversity))
div_part(bat.diet.otutable,qvalue=1)
div_part(bat.diet.otutable,qvalue=0,tree=bat.diet.tree)
#Three-level example (L1=sample, L2=species, L3=whole system)
div_part(bat.diet.otutable,qvalue=0,hierarchy=bat.diet.hierarchy)