coaltime {phybase} | R Documentation |
The function computes the coalescence time of two nodes.
coaltime(inode, jnode, nodematrix, nspecies)
inode |
the first node, it could be an internode. |
jnode |
the second node, it could be an internode. |
nodematrix |
the tree node matrix |
nspecies |
the number of species |
the function returns the coalescence time of inode
and jnode
.
Liang Liu
treestr<-"((((H:0.00402,C:0.00402):0.00304,G:0.00706):0.00929,O:0.01635):0.1,W:0.11635);" taxaname<-species.name(treestr) nodematrix<-read.tree.nodes(treestr,name=taxaname)$nodes coaltime(1,2,nodematrix,5) #the coalescence time of taxa H (1) and C (2).