prune2data: Prunes a phylogenetic tree to match a vector (e.g. of species...

View source: R/prune2data.R

prune2dataR 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)

windex documentation built on June 22, 2024, 6:47 p.m.

Related to prune2data in windex...