name2node {phybase}R Documentation

Replace species names by their node numbers

Description

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

Usage

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@oeb.harvard.edu

See Also

subtree.length, 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")
name2node(treestr,name)


[Package phybase version 1.1 Index]