as.matrix.multiPhylo: Vectorize a Set of Phylognetic Trees
Description
Unifies tip labels of all phylogenetic trees in multiPhylo
object the same as the first tree and returns the
cophenetic distance of their corresponding chronogram.
Usage
# S3 method for multiPhylo
as.matrix(x, tipOrder = x[[1]]$tip.label, parallel = FALSE, ncores = 2, ...)
Arguments
x
an object of class multiPhylo
tipOrder
a numeric vector of order of leaf names to which all trees
in the multiPhylo object will unified. If not specified on purpose,
the tip order of the first tree will be used.
parallel
a logical value indicating if parallel computing should be used. (default: FALSE)
ncores
a numeric value indicating the number of threads
utilized for multi-cored CPUs. (default: 2)
…
Not used. Other arguments to as.vector
Value
A data matrix with each row a vector representation of a chronogram. Each element of the vector is the distance between two leaves.
Examples
Run this code# NOT RUN {
data(apicomplexa)
data <- as.matrix(apicomplexa[1: 10]) # matrixize first ten trees
# }
Run the code above in your browser using DataLab