This function creates a matrix where columns 1 and 2 correspond to tip labels and column 3 gives the depth of the MRCA of that pair of tips.
It is strongly based on treeVec
and is used by relatedTreeDist
and treeConcordance
where tip labels belong to "categories".
tipsMRCAdepths(tree)
An object of class phylo
tree <- rtree(10)
plot(tree)
tipsMRCAdepths(tree)
#> tip1 tip2 rootdist
#> [1,] "t1" "t10" "0"
#> [2,] "t1" "t2" "1"
#> [3,] "t1" "t3" "4"
#> [4,] "t1" "t4" "3"
#> [5,] "t1" "t5" "3"
#> [6,] "t1" "t6" "2"
#> [7,] "t1" "t7" "2"
#> [8,] "t1" "t8" "3"
#> [9,] "t1" "t9" "1"
#> [10,] "t10" "t2" "0"
#> [11,] "t10" "t3" "0"
#> [12,] "t10" "t4" "0"
#> [13,] "t10" "t5" "0"
#> [14,] "t10" "t6" "0"
#> [15,] "t10" "t7" "0"
#> [16,] "t10" "t8" "0"
#> [17,] "t10" "t9" "0"
#> [18,] "t2" "t3" "1"
#> [19,] "t2" "t4" "1"
#> [20,] "t2" "t5" "1"
#> [21,] "t2" "t6" "1"
#> [22,] "t2" "t7" "1"
#> [23,] "t2" "t8" "1"
#> [24,] "t2" "t9" "2"
#> [25,] "t3" "t4" "3"
#> [26,] "t3" "t5" "3"
#> [27,] "t3" "t6" "2"
#> [28,] "t3" "t7" "2"
#> [29,] "t3" "t8" "3"
#> [30,] "t3" "t9" "1"
#> [31,] "t4" "t5" "5"
#> [32,] "t4" "t6" "2"
#> [33,] "t4" "t7" "2"
#> [34,] "t4" "t8" "4"
#> [35,] "t4" "t9" "1"
#> [36,] "t5" "t6" "2"
#> [37,] "t5" "t7" "2"
#> [38,] "t5" "t8" "4"
#> [39,] "t5" "t9" "1"
#> [40,] "t6" "t7" "3"
#> [41,] "t6" "t8" "2"
#> [42,] "t6" "t9" "1"
#> [43,] "t7" "t8" "2"
#> [44,] "t7" "t9" "1"
#> [45,] "t8" "t9" "1"