Description Usage Arguments Value Examples
Get D2 distance between two vectors of labels
1 | veclabeldistance(lab1, lab2, samesize = TRUE, eps = 0, nottips = FALSE)
|
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) |
D2 distance: the L2 norm comparing the vectors of labels
1 | veclabeldistance(treelabels(rtree(10)), treelabels(rtree(12))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.