tree.name2node: Replace species names by their node numbers

tree.name2nodeR Documentation

Replace species names by their node numbers

Description

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

Usage

tree.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

tree.node2name

Examples

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


lliu1871/phybase documentation built on April 21, 2024, 3:16 a.m.