# NOT RUN {
library(treenomial)
library(ape)
# coefficient matrices for ten trees of 20 tips
coeffs <- treeToPoly(rmtree(10, 20), numThreads = 0)
# distance matrix from the list of coefficient matrices
d <- polyToDistMat(coeffs, method = "logDiff", numThreads = 0)
# using the absence-presence method
d <- polyToDistMat(coeffs, method = "ap", numThreads = 0)
# }
Run the code above in your browser using DataLab