getAncestor: Find the ancestor of a node or tip

getLatestAncestorR Documentation

Find the ancestor of a node or tip

Description

Utility functions to find the ancestors of a node or tip

Usage

getLatestAncestor(phy, x)

getAncestor(phy, x, level = 1, trace = FALSE)

Arguments

phy

a phylo-class object from the ape package

x

the index of the focal node/tip

level

the depth between the ancestor and the focal node/tip

trace

logical, if FALSE (the default), only the earliest ancestor is returned, otherwise, all ancestors along the path are returned

Value

A vector of ancestor indices is returned. If root is supplied, NA will be returned

See Also

[getRoot][getNextDescendants][findSisters][getConnected]


wu-lab-uva/RasperGade documentation built on June 24, 2022, 2:47 p.m.