cuttree: cuttree: Cutting off the tree to prune recent branches.

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)

Example output

Loading required package: ape
Loading required package: geiger

TreeSim documentation built on May 2, 2019, 3:23 a.m.