hill_phylo_parti: Phylogenetic diversity of multiple sites

View source: R/hill_phylo_parti.R

hill_phylo_partiR Documentation

Phylogenetic diversity of multiple sites

Description

Calculate overall phylogenetic diversity and site similarity across multiple sites.

Usage

hill_phylo_parti(
  comm,
  tree,
  q = 0,
  base = exp(1),
  rel_then_pool = TRUE,
  show_warning = TRUE,
  check_data = TRUE
)

Arguments

comm

A data frame of vegetation data. Sites as rows, species as columns.

tree

A phylogeny with class 'phylo'.

q

Hill number, q = 0 (default) to get species richness, q = 1 to get shannon entropy, q = 2 will give inverse Simpson.

base

default is exp(1), the base of log.

rel_then_pool

default is TRUE. Abundance of species are first changed to relative abundance within sites, then pooled into one assemblage. If FALSE, sites are pooled first, then change abundance of species to relative abundance.

show_warning

whether to print warning, default is TRUE.

check_data

Whether to check the community data and phylogeny. Default is 'TRUE'. Can be set to 'FALSE' to speed up 'hill_phylo_parti_pairwise()'.

Value

A data frame with one row (across all sites) and six columns: q, gamma diversity, alpha diversity, beta diversity, local similarity (similar to Sorensen), and region similarity (similar to Jaccard).

Author(s)

Chiu & Chao, Daijiang Li

References

Chao, Anne, Chun-Huo Chiu, and Lou Jost. Unifying Species Diversity, Phylogenetic Diversity, Functional Diversity, and Related Similarity and Differentiation Measures Through Hill Numbers. Annual Review of Ecology, Evolution, and Systematics 45, no. 1 (2014): 297–324. <doi:10.1146/annurev-ecolsys-120213-091540>.

Examples

comm = dummy = FD::dummy$abun
tree = ape::rtree(n = ncol(comm), tip.label = paste0('sp', 1:8))
hill_phylo_parti(comm, tree, q = 0)
hill_phylo_parti(comm, tree, q = 0.999)
hill_phylo_parti(comm, tree, q = 1)
hill_phylo_parti(comm, tree, q = 2)


hillR documentation built on Aug. 20, 2023, 1:08 a.m.