prune2data {windex} | R Documentation |
Prunes a phylogenetic tree to match a vector (e.g. of species names in a dataset)
Description
Takes a phylo object and vector of names to be matched to tip labels and returns a pruned phylogeny containing only tip labels that match those in the vector.
Usage
prune2data(tree, species)
Arguments
tree |
Phylogenetic tree of class 'phylo'. |
species |
Vector of names to be matched against tip labels of the tree. |
Value
Returns a phylogenetic tree of the class 'phylo' containing only tips whose labels match the input vector (species)
Author(s)
Kevin Arbuckle
Examples
data(sample.data)
data(sample.tree)
tree<-prune2data(sample.tree,sample.data$species[1:10])
plot(tree)
[Package windex version 2.0.8 Index]