DP {adiv} | R Documentation |

## Plot-to-plot functional or phylogenetic dissimilarity

### Description

The function `DP`

calculates Ricotta et al. (2020) plot-to-plot functional or phylogenetic beta uniqueness (index named `D_F`

for functional data and `D_P`

for phylogenetic data, calculated with equation 2 in Ricotta et al. 2020).

### Usage

```
DP(mtree, comm, height = NULL, diag = FALSE, upper = FALSE, tol = 0.001)
```

### Arguments

`mtree` |
an object inheriting the class |

`comm` |
a matrix containing the relative or absolute abundance of all species in plots. Columns are species and plots are rows. Column labels (species names) should be assigned as in |

`height` |
either |

`diag` |
a logical value indicating whether the diagonal of the distance matrix should be printed by function |

`upper` |
a logical value indicating whether the upper triangle of the distance matrix should be printed by function |

`tol` |
a tolerance threshold. A value between - |

### Details

Object `mtree`

defines a tree with species as tips. If argument `height`

is `NULL`

, then the root of the tree will be placed at the most recent common ancestor of all species occurring in the set of plots (given in object `comm`

). An alternative position for the root can be given by specifying the height of the tree (argument `height`

). In that case, `height`

must be higher than the distance between tips and the most recent common ancestor of all species.

The tolerance threshold `tol`

is particularly important if your tree is not exactly ultrametric due to approximation problems. In that case, the distance from tip to root varies according to the tip considered, although it should not (variations are due to approximation problems). A difference smaller than `tol`

in the distance to root for two species will thus be considered as null.

### Value

The function returns a (semi-)matrix of class `dist`

with the values of the proposed dissimilarities for each pair of plots.

### Author(s)

Sandrine Pavoine sandrine.pavoine@mnhn.fr

### References

Ricotta, C., Laroche, F., Szeidl, L., Pavoine, S. (2020) From alpha to beta functional and phylogenetic redundancy. *Methods in Ecology and Evolution*. In press.

### See Also

`betaTreeUniqueness`

for beta uniqueness, `treeUniqueness`

for alpha uniqueness

### Examples

```
## Not run:
if(require(ape) && require(ade4)){
data(RutorGlacier)
phy <- read.tree(text=RutorGlacier$TreeNW)
plot(phy)
ab <- RutorGlacier$Abund[, phy$tip.label]
# Phylogenetic dissimilarities between plots
# (Ricotta et al. 2020)
Dp <- DP(phy, ab, tol=0.00001)
# Principal Coordinate Analysis of the dissimilarities
pcoDp <- dudi.pco(sqrt(Dp), full=TRUE)
s.class(pcoDp$li, as.factor(RutorGlacier$Fac))
}
## End(Not run)
```

*adiv*version 2.2.1 Index]