Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pd

Calculate Faith's Phylogenetic Diversity


Description

Calculate the sum of the total phylogenetic branch length for one or multiple samples.

Usage

pd(samp, tree, include.root=TRUE)

Arguments

samp

Community data matrix

tree

A phylo tree object

include.root

Should the root node be included in all PD calculations (default = TRUE)

Value

Returns a dataframe of the PD and species richness (SR) values for all samples

Warning

If the root is to be included in all calculations (include.root=TRUE), the PD of all samples will include the branch length connecting taxa in those samples and the root node of the supplied tree. The root of the supplied tree may not be spanned by any taxa in the sample. If you want the root of your tree to correspond to the most recent ancestor of the taxa actually present in your sample, you should prune the tree before running pd:

prunedTree <- prune.sample(sample,tree)

Note

The data sets need not be species-community data sets but may be any sample data set with an associated phylogeny. PD is not statistically independent of species richness, it positively correlates with species richness across samples. The function ses.pd compares observed PD to the values expected under various randomizations and allows a way to standardize for unequal richness across samples.

If the root is to be included in all calculations of PD (include.root=TRUE), the tree must be rooted. Single-species samples will be assigned a PD value equal to the distance from the root to the present.

If the root is not included in all calculations by default (include.root=FALSE), the tree need not rooted, but in the case of single-species samples the PD will be equal to NA and a warning will be issued.

Author(s)

Matthew Helmus mrhelmus@gmail.com, Jonathan Davies davies@nceas.ucsb.edu, Steven Kembel steve.kembel@gmail.com

References

Faith D.P. (1992) Conservation evaluation and phylogenetic diversity. Biological Conservation, 61, 1-10.

See Also

Examples

data(phylocom)
pd(phylocom$sample, phylocom$phylo)

picante

Integrating Phylogenies and Ecology

v1.8.2
GPL-2
Authors
Steven W. Kembel <steve.kembel@gmail.com>, David D. Ackerly <dackerly@berkeley.edu>, Simon P. Blomberg <s.blomberg1@uq.edu.au>, Will K. Cornwell <cornwell@zoology.ubc.ca>, Peter D. Cowan <pdc@berkeley.edu>, Matthew R. Helmus <mrhelmus@wisc.edu>, Helene Morlon <morlon.helene@gmail.com>, Campbell O. Webb <cwebb@oeb.harvard.edu>
Initial release
2020-06-08

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.