Rentropy {adiv} | R Documentation |
Function Rentropy
calculates Pavoine et al. (2017) functional or phylogenetic R entropy within communities; this index is closely related to Rao's quadratic entropy
Rentropy(comm, dis = NULL, scale = FALSE)
comm |
a data frame or a matrix with communities as rows and species as columns. Entries are abundances of species within sites. |
dis |
either |
scale |
a logical value indicating whether or not the diversity coefficient should be scaled by its maximal value over all species abundance distributions. |
The definition of the R entropy is:
R(p_i,D)=sum_k,l sqrt(p_k|i) sqrt(p_k|j) d_kl
where p_i=(p_1|i, ..., p_k|i, ..., p_S|i) is the vector of relative species abundance within community i; S is the number of species; D=(d_kl) is the matrix of (phylogenetic or functional) dissimilarities among species, and d_kl is the (phylogenetic or functional) dissimilarity between species k and l.
Function Rentropy
returns a data frame with communities as rows and the R entropy within communities as columns.
Sandrine Pavoine sandrine.pavoine@mnhn.fr
Pavoine, S., Bonsall, M.B., Dupaix, A., Jacob, U., Ricotta, C. (2017) From phylogenetic to functional originality: guide through indices and new developments. Ecological Indicators, 82, 196–205.
## Not run: if(require(ade4)){ data(ecomor, package="ade4") dtaxo <- dist.taxo(ecomor$taxo) bird.R <- Rentropy(t(ecomor$habitat), dtaxo^2/2) dotchart(bird.R$diversity, labels = rownames(bird.R)) } ## End(Not run) ## Not run: if(require(ape)){ data(batcomm) phy <- read.tree(text=batcomm$tre) dphy <- as.dist(cophenetic(phy))/2 ab <- batcomm$ab[, phy$tip.label] bat.R <- Rentropy(ab, dphy) dotchart(bat.R$diversity, labels = rownames(bat.R), xlab = "Entropy") } ## End(Not run)