[R-sig-phylo] assign numbers to nodes

2013-07-05 Thread Juan Antonio Balbuena
Hello Sorry for this apparently simple question, but could not find the right answer on the internet. For a given phylo object in ape consisting of n tips, how can I assign unique node numbers from 1 to 2n-1, such that if a node i is ancestral to a node k, i

Re: [R-sig-phylo] assign numbers to nodes

2013-07-05 Thread Liam J. Revell
Hi Juan. I'm pretty sure that by ape phylo convention all node numbers in tree$edge are such that all descendants node numbers ancestor node numbers. To assign numbers to node labels such that the reverse is true (and such that node numbers go from 1:tree$Nnode) you can do: