Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

PairwiseDistances

Distances between each pair of trees


Description

Distances between each pair of trees

Usage

PairwiseDistances(trees, Func, valueLength = 1L, ...)

Arguments

trees

List of trees of class phylo.

Func

Function returning a distance between two trees.

valueLength

Integer specifying expected length of the value returned by Func.

...

Additional arguments to Func.

Value

Matrix detailing distance between each pair of trees. Identical trees are assumed to have zero distance.

Author(s)

Martin R. Smith (martin.smith@durham.ac.uk)

Examples

trees <- list(BalancedTree(8), PectinateTree(8), StarTree(8))
TCIDiff <- function (tree1, tree2) {
  TotalCopheneticIndex(tree1) - TotalCopheneticIndex(tree2)
}
PairwiseDistances(trees, TCIDiff, 1)
TCIRange <- function (tree1, tree2) {
  range(TotalCopheneticIndex(tree1), TotalCopheneticIndex(tree2))
}
PairwiseDistances(trees, TCIRange, 2)

TreeTools

Create, Modify and Analyse Phylogenetic Trees

v1.4.4
GPL (>= 3)
Authors
Martin R. Smith [aut, cre, cph] (<https://orcid.org/0000-0001-5660-1727>), Emmanuel Paradis [cph] (<https://orcid.org/0000-0003-3092-2199>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.