as.vector.phylo {Rtropical} | R Documentation |
Computes the cophenetic distance and outputs them in a vector
of a phylogenetic tree in phylo
object
## S3 method for class 'phylo'
as.vector(x, mode = "any")
x |
A object of class phylo |
mode |
The same as |
A vector with its elements the distance between two leaves of the tree.
library(ape)
tree <- rcoal(5)
tree_vec <- as.vector(tree)