trString <- "(((Strix_aluco:4.2,Asio_otus:4.2):3.1,Athene_noctua:7.3):6.3,Tyto_alba:13.5);"
tree.owls <- ape::read.tree(text=trString)
o2 <- as(tree.owls,"phylo4")
ov <- as(o2,"phylo4vcov")
o3 <- as(ov,"phylo4")
## these are not completely identical, but are
## topologically identical ...
## edge matrices are in a different order:
## cf. o2@edge and o3@edge
## BUT the edge matrices are otherwise identical
identical(o2@edge[order(o2@edge[,2]),],
o3@edge[order(o3@edge[,2]),])
## There is left/right ambiguity here in the tree orders:
## in o2 the 5->6->7->1 lineage
## (terminating in Strix aluco)
## is first, in o3 the 5->6->3 lineage
## (terminating in Athene noctua) is first.
Run the code above in your browser using DataLab