Cut the phylogeny at a given age or node
The function cuts all the branches of the phylogeny which are younger than a specific age or node (i.e. the age of the node).
cutPhylo(tree,age=NULL,node=NULL,keep.lineage=TRUE)
tree |
a phylogenetic tree. The tree needs not to be ultrametric and fully dichotomous. |
age |
the age (in terms of time distance from the recent) at which the tree must be cut |
node |
the node whose age must be used as cutting limit. |
keep.lineage |
logical specifying whether lineages with no descendant tip must be retained (see example below). Default is |
When an entire lineage is cut (i.e. one or more nodes along a path) and keep.lineages = TRUE
,
the leaves left are labeled as "l" followed by a number.
The function returns the cut phylogeny and plots it into the graphic device. The time axis keeps the root age of the original tree.
Pasquale Raia, Silvia Castiglione, Carmela Serio, Alessandro Mondanaro, Marina Melchionna, Mirko Di Febbraro, Antonio Profico, Francesco Carotenuto
## Not run: library(ape) set.seed(22) rtree(100)->tree 3->age cutPhylo(tree,age=age)->t1 cutPhylo(tree,age=age,keep.lineage=FALSE)->t1 cutPhylo(tree,node=151)->t2 cutPhylo(tree,node=151,keep.lineage=FALSE)->t2 ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.