as.vector.phylo: Vectorize a Phylogenetic Tree

Description Usage Arguments Value Examples

View source: R/as.vector.phylo.R

Description

Computes the cophenetic distance and outputs them in a vector of a phylogenetic tree in phylo object

Usage

1
2
## S3 method for class 'phylo'
as.vector(x, mode = "any")

Arguments

x

A object of class phylo

mode

The same as base::as.vector. But only numeric output in vector form is accepted for other functions in Rtropical

Value

A vector with its elements the distance between two leaves of the tree.

Examples

1
2
3
library(ape)
tree <- rcoal(5)
tree_vec <- as.vector(tree)

Rtropical documentation built on Nov. 10, 2021, 1:07 a.m.