pd {picante} | R Documentation |
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)