treedist {phybase} | R Documentation |
This function calculates the distance between two trees.
treedist(tree1,tree2)
tree1 |
the first tree node matrix |
tree2 |
the second tree node matrix |
The function returns the distance of two trees.
Liang Liu lliu@oeb.harvard.edu
treestr1<-"((((H:0.00402,C:0.00402):0.00304,G:0.00706):0.00929,O:0.01635):0.1,W:0.11635);" treestr2<-"((((H:0.00402,G:0.00402):0.00304,C:0.00706):0.00929,O:0.01635):0.1,W:0.11635);" name<-species.name(treestr1) nodematrix1<-read.tree.nodes(treestr1,name)$nodes nodematrix2<-read.tree.nodes(treestr2,name)$nodes treedist(nodematrix1,nodematrix2)