Learn R Programming

picante (version 1.8.4)

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)

Value

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

Arguments

samp

Community data matrix

tree

A phylo tree object

include.root

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

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)

Author

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

psr, ses.pd

Examples

Run this code
data(phylocom)
pd(phylocom$sample, phylocom$phylo)

Run the code above in your browser using DataLab