pruningwise.distFromRoot: Calculates node distance from the root in an "pruningwise"...

View source: R/tools.R

pruningwise.distFromRootR Documentation

Calculates node distance from the root in an "pruningwise" tree

Description

Calculates the distance from the root to all nodes, in a tree whose internal representation is in "pruningwise" order.

Usage

pruningwise.distFromRoot(phy)

Arguments

phy

a phylogenetic tree of type phylo with branch lengths, already in "pruningwise" order.

Value

a vector of distances, with the original tip labels and internal node names if internal node names were available, or otherwise named by the node numbers in phy.

Author(s)

Lam Si Tung Ho

See Also

pruningwise.branching.times, cophenetic.

Examples

tre = reorder(rtree(50),"pruningwise")
pruningwise.distFromRoot(tre)

lamho86/phylolm documentation built on Nov. 11, 2023, 6:17 a.m.