drop.extinct {geiger}R Documentation

prune specified taxa from a phylogenetic tree

Description

pruning a set of taxa from a tree

Usage

drop.extinct(phy, tol = NULL)
drop.random(phy, n)

Arguments

phy

a phylogenetic tree of class 'phylo'

tol

rounding-error tolerance for taxa that do not reach the present day exactly

n

number of random taxa to prune from the tree

Details

The functions prune taxa from a tree either at random or based either on a temporal criterion (whether the leaves reach the present within a given tol). By default, tol = min(phy$edge.length)/100. The result is a tree that has been pruned based on the given criterion. The function is.extinct will return a vector of the tip labels of inferred extinct taxa (or NULL is no extinct taxa exist).

Author(s)

LJ Harmon, and JW Brown

See Also

drop.tip

Examples


# Birth-death tree with extinct taxa
p1 <- sim.bdtree(b=0.2, d=0.1, stop="time", seed=1, t=30)
plot(p1, cex=0.25)

# List extinct taxa
p1.extinct <- is.extinct(p1)

# Previous tree with extinct taxa removed
p2 <- drop.extinct(p1)
plot(p2, cex=0.5)



[Package geiger version 2.0.11 Index]