add.tip.random: Add tips at random to the tree

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

Description

Function to add new tip at random to a tree with branch length. This function is a small change in the function add.random, see details.

Usage

1
add.tip.random(tree, tip, method = "length")

Arguments

tree

phylogeny as an object of class "phylo".

tip

tip name for the added.

method

The method to add the new tip, partial match to "equal" or "length". See details (Default method = "length").

Details

This function is a small change in the function add.random allowing add only one tip at random only in ultrametric phylogenetic tree. Two methods are available. The method "length" add the tip with probability equivalent to edge length, long edge have more probability than short edge. The method "equal" each edge has equal probability to receive the new tip.

Value

The phylogeny as an object of class "phylo" with new tip.

Author(s)

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

See Also

add.random add.taxa.phylo

Examples

1
2
3
4
5
6
7
8
set.seed(10)
tree <- rtree(5)
tree <- compute.brlen(tree)
tree <- makeNodeLabel(tree)
plot.phylo(tree, show.node.label = TRUE)
res <- add.tip.random(tree, "NEW", method = "length")
res
plot.phylo(res, show.node.label = TRUE)

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