phylobase (version 0.8.2)

edges: Edges accessors

Description

Access or modify information about the edges.

Usage

edges(x, ...)
"edges"(x, drop.root = FALSE)
edgeOrder(x, ...)
"edgeOrder"(x)
internalEdges(x)
"internalEdges"(x)
terminalEdges(x)
"terminalEdges"(x)

Arguments

x
a phylo4 or phylo4d object.
drop.root
logical (default FALSE), should the edge connecting the root be included in the edge matrix?
...
Optional arguments used by specific methods. (None used at present).

Value

edges
returns the edge matrix that represent the ancestor-descendant relationships among the nodes of the tree.
edgeOrder
returns the order in which the edge matrix is in.
internalEdges
returns a logical vector indicating internal edges (edges that connect an internal node to another). This vector is named with the edgeId
.
terminalEdges
returns a logical vector indicating terminal edges (edges that connect an internal node to a tip). This vector is named with the edgeId

See Also

reorder, edgeId

Examples

Run this code
   data(geospiza)
   edges(geospiza)
   edgeOrder(geospiza)
   geoPost <- reorder(geospiza, "postorder")
   edgeOrder(geoPost)
   ## with a binary tree this should always be true
   identical(!terminalEdges(geospiza), internalEdges(geospiza))

Run the code above in your browser using DataLab