getConnected: Find the edges/nodes connected to a node

View source: R/ape_utils.R

findEdgesR Documentation

Find the edges/nodes connected to a node

Description

An utility function to find the sister nodes/tips of a node/tip

Usage

findEdges(phy, node, ancestor = FALSE)

getConnected(phy, x)

Arguments

phy

a phylo-class object from the ape package

node

the index of the focal node

ancestor

logical, if FALSE (the default), the edges originating from the node are returned, otherwise, the edge leading to the node is returned.

x

the index of the focal node

Value

findEdges returns the indices of the edges. Note that these indices are different from those of nodes/tips

getConnected returns the indices of the connected nodes.

See Also

[getRoot][getAncestor][getNextDescendants][findSisters]


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