name_nodenumber_conversion: Convert between node/tip labels and integer node numbers

name_nodenumber_conversionR Documentation

Convert between node/tip labels and integer node numbers

Description

Useful if you want to convert between node labels (c), tip labels (t) and the internal integer number that identifies that node (nn). Particularly for use with plotting libraries.

Usage

nn.to.name(tr, x)

name.to.nn(tr, x)

Arguments

tr

object of type phylo

x

vector of numerics or characters

Value

vector

Examples

tr <- named_rtree(5)
name.to.nn(tr, 'n1')
name.to.nn(tr,c('n1','n2','t1'))
nn.to.name(tr, 1:9)

jsilve24/philr documentation built on Oct. 17, 2024, 4:59 p.m.