View source: R/distFunctions.R
treeToDistMat | R Documentation |
Calculates the distance matrix from a list of phylo objects
treeToDistMat( trees, method = c("fraction", "logDiff", "wLogDiff", "pa", "ap"), type = c("default", "yEvaluated", "tipLabel"), y, numThreads = -1 )
trees |
a single phylo object or a list of phylo objects |
method |
method to use when calculating coefficient distances:
|
type |
one of:
|
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 |
a distance matrix
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 matrix for 10 trees of 30 tips treeToDistMat(rmtree(10, 30), method = "wLogDiff", numThreads = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.