compact.tree: Compact a phylogenetic tree

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/compact.tree.R

Description

Funtion to compact a phylogenetic tree. See details.

Usage

1
compact.tree(tree, nodes)

Arguments

tree

phylogeny as an object of class "phylo".

nodes

a vector with node label to compact the edges. Only two tips are keeps, most short a most long within each nodes

Details

This function compacts the node of a phylogenetic tree. Inside each node the function removes tips using the function drop.tip. Only two tips are keeped: the longhest and shortest edge length within each node. This can be useful only for the function plotcollapse.phylo.

Value

The phylogeny as an object of class "phylo" with nodes compacted.

Author(s)

Vanderlei Julio Debastiani <vanderleidebastiani@yahoo.com.br>

See Also

plotcollapse.phylo graphical.node.patterns

Examples

1
2
3
4
5
6
7
8
set.seed(10)
tree <- rtree(15)
tree <- makeNodeLabel(tree)
plot.phylo(tree, show.node.label = TRUE)
nodes <- c("Node6", "Node13")
res <- compact.tree(tree, nodes)
res
plot.phylo(res, show.node.label = TRUE)

vanderleidebastiani/daee documentation built on Jan. 22, 2021, 2:41 p.m.