View source: R/distFunctions.R
treeDist | R Documentation |
Calculates the distance between two trees or a tree and a list of trees.
treeDist( x, Y, type = c("default", "yEvaluated", "tipLabel"), method = c("fraction", "logDiff", "wLogDiff", "pa", "ap"), y, numThreads = -1 )
x |
single phylo object |
Y |
a list of phylo objects |
type |
one of:
|
method |
method to use when calculating coefficient distances:
|
y |
the y value to evaluate the polynomial at when type is “yEvaluated”, ignored otherwise |
numThreads |
number of threads to be used, the default (-1) will use the number of cores in the machine and numThreads = 0 will only use the main thread |
vector of distances
the substituted y coefficient vector only supports the “logDiff” method and the “fraction” method
“pa” and “ap” force symmetry in the output distance matrix
library(treenomial) library(ape) # distance between one 10 tip tree and 100 trees with 30 tips # generate the trees tenTipTree <- rtree(10) thirtyTipList <- rmtree(100, 30) # find the distance treeDist(tenTipTree, thirtyTipList, numThreads = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.