treedist {phybase}R Documentation

Distance between two trees

Description

This function calculates the distance between two trees.

Usage

treedist(tree1,tree2)

Arguments

tree1 the first tree node matrix
tree2 the second tree node matrix

Value

The function returns the distance of two trees.

Author(s)

Liang Liu lliu@oeb.harvard.edu

See Also

pair.dist, partition.tree

Examples

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)

[Package phybase version 1.1 Index]