Rentropy {adiv}R Documentation

Pavoine et al. (2017) functional or phylogenetic entropy

Description

Function Rentropy calculates Pavoine et al. (2017) functional or phylogenetic R entropy within communities; this index is closely related to Rao's quadratic entropy

Usage

Rentropy(comm, dis = NULL, scale = FALSE)

Arguments

comm

a data frame or a matrix with communities as rows and species as columns. Entries are abundances of species within sites.

dis

either NULL or an object of class dist that contains the (functional or phylogenetic) distances among species. If NULL species are said equidistant with a distance of 1 between any two species and a distance of 0 between a species and itself.

scale

a logical value indicating whether or not the diversity coefficient should be scaled by its maximal value over all species abundance distributions.

Details

The definition of the R entropy is:

R(\mathbf{p}_i,\mathbf{D})=\sum_{k=1}^S\sum_{l=1}^S \sqrt{p_{k|i}}\sqrt{p_{k|j}}d_{kl}

where \mathbf{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; \mathbf{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.

Value

Function Rentropy returns a data frame with communities as rows and the R entropy within communities as columns.

Author(s)

Sandrine Pavoine sandrine.pavoine@mnhn.fr

References

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.

Examples

## 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)

[Package adiv version 2.2.1 Index]