Learn R Programming

Rogue (version 2.1.7)

GraphGeodesic: Graph Geodesic between leaves of unweighted tree

Description

Graph Geodesic between leaves of unweighted tree

Usage

GraphGeodesic(x, nTip = length(x$tip.label), log = FALSE, asMatrix = TRUE)

Cophenetic(x, nTip = length(x$tip.label), log = FALSE, asMatrix = TRUE)

Value

GraphGeodesic() returns an unnamed integer matrix describing the number of edges between each pair of edges.

Arguments

x

Object of class phylo.

nTip

Integer specifying number of leaves.

asMatrix

Logical specifying whether to coerce output to matrix format.

Author

Martin R. Smith, modifying algorithm by Emmanuel Paradis in ape::dist.nodes().

Examples

Run this code
GraphGeodesic(TreeTools::BalancedTree(5))

Run the code above in your browser using DataLab