Learn R Programming

phylobase (version 0.6.8)

phylo4-accessors: Methods for S4 phylogeny classes

Description

Generic methods for phylogenetic trees represented as S4 classes

Usage

## S3 method for class 'phylo4':
nNodes(x)
## S3 method for class 'phylo4':
nTips(x)
## S3 method for class 'phylo4':
depthTips(x)
## S3 method for class 'phylo4':
edges(x, drop.root=FALSE, \dots)
## S3 method for class 'phylo4':
nEdges(x)
## S3 method for class 'phylo4':
edgeOrder(x, \dots)
## S3 method for class 'phylo4':
hasEdgeLength(x)
## S3 method for class 'phylo4':
edgeLength(x, node)
## S3 method for class 'phylo4':
edgeLength(x, use.names=TRUE) <- value
## S3 method for class 'phylo4':
nodeType(x)
## S3 method for class 'phylo4':
nodeDepth(x, node)
## S3 method for class 'phylo4':
isRooted(x)
## S3 method for class 'phylo4':
rootEdge(x)
## S3 method for class 'phylo4':
rootNode(x)
## S3 method for class 'phylo4':
rootNode(x) <- value
## S3 method for class 'phylo4':
isUltrametric(x, tol=.Machine$double.eps^0.5)

Arguments

x
a phylo4/phylo4d object
node
which edge to extract (indexed by descendant node)
value
a vector of edge lengths or a node number
use.names
Should the names of value be used to match edge lengths provided?
drop.root
logical: drop root row from edge matrix?
tol
tolerance in rounding error to determine whether the tree is ultrametric
...
additional parameters passed (currently ignored)

Examples

Run this code
data(geospiza)
edgeLength(geospiza, 5)
edgeLength(geospiza, "olivacea")
edgeLength(geospiza, 5:7)

Run the code above in your browser using DataLab