name_nodenumber_conversion {philr}R 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)

[Package philr version 1.20.0 Index]