powered by
Plot the min/max distance trees from a target tree
plotExtremeTrees( target, trees, n, comparison = "min", method = c("fraction", "logDiff", "wLogDiff", "pa", "ap"), type = c("default", "yEvaluated", "tipLabel"), y, numThreads = -1 )
the phylo object of the tree to calculate the distances to
a list of phylo objects to compare with the target
the number of trees to find and plot
whether to find the “min” or the “max” distance trees from the target
method to use when calculating coefficient distances:
for two coefficient matrices A and B returns sum(abs(A-B)/(A+B)), excluding elements where both A and B are zero
for two coefficient matrices A and B returns sum(log(1+abs(A-B))
performs the “logDiff” method with weights on the rows
total pairs where the coefficient is present in one matrix and absent in the other (presence-absence)
opposite comparison of pa (absence-presence)
one of:
tree distinguishing polynomials in two variables x (columns) and y (rows)
tree distinguishing polynomials with y evaluated at a specified argument
complex coefficient polynomial that utilize binary trait tip labels on the phylo objects
the y value to evaluate the polynomial at when type is “yEvaluated”, ignored otherwise
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 list of lists containing the n min/max distance trees and their distances to target
# NOT RUN { library(treenomial) library(ape) trees <- c(rmtree(1000, 50), rmtree(10, 9)) target <- rtree(50) minTrees <- plotExtremeTrees(target, trees, 2, comparison = "min", numThreads = 0) # }
Run the code above in your browser using DataLab