Last data update: 2014.03.03

R: cuttree: Cutting off the tree to prune recent branches.
cuttreeR Documentation

cuttree: Cutting off the tree to prune recent branches.

Description

cuttree takes as input a tree and a cuttime, and then prunes all lineages more recent than cuttime.

Usage

cuttree(tree,cuttime)

Arguments

tree

Phylogenetic tree.

cuttime

Time before present at which all descendent lineages are deleted. Value between 0 (the present i.e. nothing is deleted) and the age of the tree (i.e. the whole tree is deleted).

Value

tree

Tree where all branches more recent than cuttime are pruned from the input tree.

Author(s)

Tanja Stadler

Examples

n<-10
lambda <- 2.0
mu <- 0.5
frac <-0.6
numbsim<-2
age<-2

##
# Simulating numbsim reconstructed trees with n sampled species under a
# birth-death process with speciation rate lambda, extinction rate mu,
# sampling probability frac, and time age since origin:

trees<-sim.bd.taxa.age(n, numbsim, lambda, mu, frac, age, mrca = FALSE)

treec<-cuttree(trees[[1]],0.3)

plot(trees[[1]])
plot(treec)

Results