collapseTips: Remove all tips smaller than min.length

Description Usage Arguments Details References Examples

Description

Return a phylo object with tip edges less than min.length removed.

Usage

1
collapseTips(tree, min.length, iterative = TRUE)

Arguments

tree

phylogenetic tree (ape class)

min.length

smallest length for a tip edge

iterative

run until no tip edges less than min.length, default TRUE

Details

Tips are removed, but the tree age is preserved. Returned trees are therefore not the same phylogenetic tree as that given. The purpose of the function is to generate representations of trees with fewer tips for plotting purposes.

Set iterative as TRUE to keep removing all tip edges less than min.length.

References

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

Examples

1
2
3
4
5
6
tree <- rtree (100)
par (mfrow = c (1,2))
plot (tree, show.tip.label=FALSE, main='Full tree')
tree.age <- getSize (tree, 'rtt')
ctree <- collapseTips (tree, min.length=tree.age*0.1)
plot (ctree, show.tip.label=FALSE, main='Collapsed tree')

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