weightlabeldistance: Get weighted D2 distance between two vectors of labels

Description Usage Arguments Value Examples

Description

Get weighted D2 distance between two vectors of labels

Usage

1
2
weightlabeldistance(lab1, lab2, weights = function(x) ifelse(is.numeric(x),
  1/(1 + log(x)), 1e-04))

Arguments

lab1

A vector of tree labels (as created by treelabels)

lab2

A vector of tree labels (as created by treelabels)

weights

A function in the form ifelse(is.numeric(x),VALUE1,VALUE2) where VALUE1 is the weight applied to labels that have not been hashed (integers; fewer than 12 digits) and VALUE2 is the value if hashed. Default is (1/(1+log(x)) and 0.0001

Value

weighted D2 distance

Examples

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

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