Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

edges-accessors

Edges accessors


Description

Access or modify information about the edges.

Usage

edges(x, ...)

## S4 method for signature 'phylo4'
edges(x, drop.root = FALSE)

edgeOrder(x, ...)

## S4 method for signature 'phylo4'
edgeOrder(x)

internalEdges(x)

## S4 method for signature 'phylo4'
internalEdges(x)

terminalEdges(x)

## S4 method for signature 'phylo4'
terminalEdges(x)

Arguments

x

a phylo4 or phylo4d object.

...

Optional arguments used by specific methods. (None used at present).

drop.root

logical (default FALSE), should the edge connecting the root be included in the edge matrix?

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

Author(s)

Ben Bolker, Francois Michonneau, Thibaut Jombart

See Also

reorder, edgeId

Examples

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))

phylobase

Base Package for Phylogenetic Structures and Comparative Data

v0.8.10
GPL (>= 2)
Authors
R Hackathon et al. (alphabetically: Ben Bolker, Marguerite Butler, Peter Cowan, Damien de Vienne, Dirk Eddelbuettel, Mark Holder, Thibaut Jombart, Steve Kembel, Francois Michonneau, David Orme, Brian O'Meara, Emmanuel Paradis, Jim Regetz, Derrick Zwickl)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.