"phylo"
and
"matching"
.as.matching(x, ...)
## S3 method for class 'phylo':
as.matching(x, labels = TRUE, ...)
## S3 method for class 'matching':
as.phylo(x, ...)
as.matching
returns an object of class "matching"
with
the following component:matching
.matching
.matching
(i.e. the ith
element is the label of the node numbered i + n in matching
,
with n the number of tips).as.phylo.matching
returns an object of class "phylo"
.Diaconis and Holmes (1998) gave some conventions to insure that a given tree has a unique representation as a matching. I have tried to follow them in the present functions.
as.phylo
data(bird.orders)
m <- as.matching(bird.orders)
str(m)
m
tr <- as.phylo(m)
all.equal(tr, bird.orders)
Run the code above in your browser using DataLab