qDT | R Documentation |

Function `qDT`

calculates the `^qD(T)`

index developed by Chao et al. (2010) as the mean diversity of order *q* over *T* years in a phylogenetic tree. In function `qDT`

, the index is computed over the whole tree from root to tips. It uses the formula of the `^qD(T)`

index extended to non-ultrametric trees (where the distance from tip to root varies) (Chao et al. 2010, equation 4.5) .

```
qDT(phyl, comm, q = 2, tol = 1e-08)
```

`phyl` |
an object inheriting the class |

`comm` |
a data frame or a matrix typically with communities as rows, species as columns and abundance as entry. Species should be labeled as in the phylogenetic tree where they are the tips. |

`q` |
a vector with nonnegative value(s) for parameter |

`tol` |
numeric tolerance threshold: values between - |

If only one value of `q`

is given, a vector with the phylogenetic diversity of each community is returned.
If more than one value of `q`

is given, a list of two objects is returned:

`q` |
the vector of values for |

`div` |
a data frame with the phylogenetic diversity of each community calculated for all values of |

The results of function `plot.qDT`

are of class `"evodivparam"`

. As such, function `plot.evodivparam`

allows to plot the results of function `qDT`

.

Sandrine Pavoine sandrine.pavoine@mnhn.fr

Chao, A., Chiu, C.-H., Jost, L. (2010) Phylogenetic diversity measures based on Hill numbers. *Philosophical Transactions of the Royal Society London Series B*, **365**, 3599–3609.

`evodivparam`

```
## Not run:
if(require(ape)){
data(batcomm)
phy <- read.tree(text=batcomm$tre)
ab <- batcomm$ab[, phy$tip.label]
plot(qDT(phy, ab))
plot(qDT(phy, ab, q=seq(0, 10, length=20)))
}
## End(Not run)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.