phangorn (version 2.11.1)

add.tips: Add tips to a tree

Description

This function binds tips to nodes of a phylogenetic trees.

Usage

add.tips(tree, tips, where, edge.length = NULL)

Value

an object of class phylo

Arguments

tree

an object of class "phylo".

tips

a character vector containing the names of the tips.

where

an integer or character vector of the same length as tips giving the number of the node or tip of the tree where to add the new tips.

edge.length

optional numeric vector with edge length

Author

Klaus Schliep klaus.schliep@gmail.com

See Also

bind.tree

Examples

Run this code
tree <- rcoal(10)
plot(tree)
nodelabels()
tiplabels()
tree1 <- add.tips(tree, c("A", "B", "C"), c(1,2,15))
plot(tree1)

Run the code above in your browser using DataLab