veclabeldistance: Get D2 distance between two vectors of labels

Description Usage Arguments Value Examples

Description

Get D2 distance between two vectors of labels

Usage

1
veclabeldistance(lab1, lab2, samesize = TRUE, eps = 0, nottips = FALSE)

Arguments

lab1

A vector of tree labels (as created by treelabels)

lab2

A vector of tree labels (as created by treelabels)

samesize

Logical: are the trees the same size?

eps:

if the trees are not the same size (samesize=F), the components in the distance will be divided by the number of tips. Then eps*(difference in tip number) is added to preserve the metric property.

nottips:

exclude the number of 1s from the distance (default F)

Value

D2 distance: the L2 norm comparing the vectors of labels

Examples

1
veclabeldistance(treelabels(rtree(10)), treelabels(rtree(12))

carolinecolijn/treetop documentation built on May 13, 2019, 12:50 p.m.