tree.to.vector {TML}R Documentation

Phylogenetic tree to vector

Description

A tree is converted to a vector of pairwise distances between leaves. Distance between leaves is defined as the cophenetic distance between them. Normalization is applied so that the maximum distance in the vector output is 1.

Usage

tree.to.vector(tree, normalization = TRUE)

Arguments

tree

phylogenetic tree

normalization

logical; normalize the tree if TRUE

Value

vector of pairwise distances in R^(m choose 2), where m is the number of leaves

Author(s)

Georgios Aliatimis g.aliatimis@lancaster.ac.uk

References

Aliatimis, Georgios, Ruriko Yoshida, Burak Boyaci, James A. Grant (2023). Tropical Logistic Regression on Space of Phylogenetic Trees

Examples

tree <- ape::read.tree(text='((A:1, B:1):2, (C:1, D:1):2);')
tree.to.vector(tree)

[Package TML version 1.2.0 Index]