name2node: Replace species names by their node numbers

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

Description

This function replaces the species names in the tree string with their node numbers.

Usage

1
name2node(treestr,name="")

Arguments

treestr

the tree string

name

the species names

Details

If species names are not given, the function will use the sorted species names in the tree string.

Value

The function returns the tree string with the species names replaced by the node numbers.

Author(s)

Liang Liu lliu@uga.edu

See Also

subtree.length, node2name

Examples

1
2
3
treestr<-"(((H:4.2,C:4.2):3.1,G:7.3):6.3,O:13.5);"
name<-c("H","G", "C", "O")
name2node(treestr,name)

bomeara/phybase documentation built on May 12, 2019, 11:35 p.m.