internals: Internal functions

Description Usage Arguments Value Author(s)

Description

These helper functions are unlikely to be of day-to-day use, but are exported in case they are valuable to package developers.

Usage

1
2
3
.CatchBadPair(i, tree1, tree2)

.DistReturn(ret, tree1, tree2, allPairs)

Arguments

i

Integer iterating tree pair.

tree1, tree2

Trees of class phylo.

ret

A list containing the results of a tree comparison, probably performed in C. Each element of the list will correspond to an aspect of tree distance (e.g. TBR distance, MAF composition).

allPairs

Logical specifying whether all trees were compared with all other trees, in which case a structure of class dist will be returned for numeric entries, and a symmetric matrix (with diagonal marked NA) returned for non-numeric entries.

Value

.CatchBadPair() returns integer(0), but will stop R with an error message if the labels of tree1 and tree2 differ in anything but order.

.DistReturn() returns a structure of class numeric, matrix or dist containing the distances between each pair of trees.

Author(s)

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


TBRDist documentation built on Sept. 17, 2020, 5:07 p.m.