removeTip: Remove a tip from a phylogenetic tree

Description Usage Arguments Details References Examples

Description

Remove tips from a phylogenetic tree

Usage

1
removeTip(tree, tips, preserve.age)

Arguments

tree

phylogenetic tree (ape class)

tips

vector of tip names

preserve.age

maintain the root to tip distance of the tree

Details

Based on ape's drop.tip but with preserve.age. This will ensure the root to tip distance of the tree is maintained by adding length to next immediate internal edge whenever the removal of a tip leads to a reduction in a tree's age. If root node is lost, then lost edge length is added to root.edge slot.

References

No references yet! https://github.com/DomBennett/MoreTreeTools.

Examples

1
2
3
4
5
tree <- rtree (10)
par (mfrow=c (1,3))
plot (tree)
plot (removeTip (tree, tips=c ('t1', 't2', 't3'), preserve.age=FALSE))
plot (removeTip (tree, tips=c ('t1', 't2', 't3'), preserve.age=TRUE), root.edge=TRUE)

DomBennett/MoreTreeTools documentation built on May 6, 2019, 2:51 p.m.