prune.extinct.taxa {geiger}R Documentation

Prune specified taxa from a phylogenetic tree

Description

Prunes a set of taxa from a tree, either a random fraction of all taxa, or just the taxa whos tip branch terminates before the present day (extinct taxa)

Usage

prune.extinct.taxa(phy, tol = .Machine$double.eps^0.5)
prune.random.taxa(phy, n)

Arguments

phy Phylogenetic tree
tol Tolerance for taxa that do not reach the present day exactly. This prevents taxa from being pruned just due to rounding error
n Number of random taxa to prune from the tree

Value

New tree without these taxa

Author(s)

Luke J. Harmon

Examples


# Birth-death tree with extinct taxa
p2<-birthdeath.tree(b=0.2, d=0.1, time.stop=30)
plot(p2)

# Previous tree with extinct taxa removed
prune.extinct.taxa(p2)->p3
if(!is.null(p3)) plot(p3)

p4<-birthdeath.tree(b=0.2, d=0, taxa.stop=100)
p5<-prune.random.taxa(p4, 40)

plot(p5)


[Package geiger version 1.2-14 Index]