ouchtree {ouch}R Documentation

Phylogenetic tree object in ouch format

Description

ouchtree constructs a representation of a phylogenetic tree.

ape2ouch translates ape's phylo representation of a phylogenetic tree into ouch's ouchtree representation. Optionally, the user can adjust the branch lengths while preserving the topology.

Usage

ouchtree(nodes, ancestors, times, labels = as.character(nodes))

ape2ouch(tree, scale = TRUE, branch.lengths = tree$edge.length)

Arguments

nodes

A character vector giving the name of each node. These are used internally and must be unique.

ancestors

Specification of the topology of the phylogenetic tree. This is in the form of a character vector specifying the name (as given in the nodes argument) of the immediate ancestor of each node. In particular, the i-th name is that of the ancestor of the i-th node. The root node is distinguished by having no ancestor (i.e., NA).

times

A vector of nonnegative numbers, one per node in the tree, specifying the time at which each node is located. Time should be increasing from the root node to the terminal twigs.

labels

Optional vector of node labels. These will be used in plots to label nodes. It is not necessary that these be unique.

tree

a tree of class ape::phylo.

scale

optional. If scale=TRUE, the tree's depth will be scaled to 1. If scale is a number, then the branch lengths will be scaled by this number.

branch.lengths

optional vector of branch lengths.

Details

ouchtree() creates an ouchtree object given information on the phylogeny's topology and node times. An ouchtree object also (optionally) holds names of taxa for display purposes.

Author(s)

Aaron A. King

A. A. King, D. Ackerly

See Also

Other phylogenetic comparative models: brown(), hansen(), ouch-package, paint()

Examples

tree <- with(
  bimac,
  ouchtree(nodes=node,ancestors=ancestor,times=time,labels=spcode)
)
tree

plot(tree)
plot(tree, node.names=TRUE)    # display node names


[Package ouch version 2.19-2 Index]