ouchtree-class: Phylogenetic tree object in 'ouch' format.

Description Usage Arguments Details Methods Author(s) See Also Examples

Description

An object containing a phylogenetic tree in a form suitable for using ouch methods.

Usage

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

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.

Details

ouchtree creates an ouchtree object. This contains the topology, branch times, and epochs. It also holds (optionally) names of taxa for display purposes.

Methods

plot(tree,regimes=NULL,node.names=FALSE,legend=TRUE,...)

displays the phylogenetic tree graphically.

print()

displays the tree in table form.

show()

displays the tree.

coerce

An ouchtree object can be coerced to a data-frame via as(object,"data.frame").

Author(s)

Aaron A. King kingaa at umich dot edu

See Also

ouchtree, ape2ouch, brown, hansen

Examples

1
2
3
4
5
data(bimac)
tree <- with(bimac,ouchtree(nodes=node,ancestors=ancestor,times=time,labels=species))
plot(tree)
plot(tree,node.names=TRUE)
print(tree)

Example output

Loading required package: subplex
   nodes ancestors times labels
1      1      <NA>     0   <NA>
2      2         1    12   <NA>
3      3         2    32   <NA>
4      4         3    34   <NA>
5      5         4    36   <NA>
6      6         3    36   <NA>
7      7         1     8   <NA>
8      8         7    13   <NA>
9      9         8    18   <NA>
10    10         9    23   <NA>
11    11        10    28   <NA>
12    12         9    28   <NA>
13    13         8    22   <NA>
14    14        13    26   <NA>
15    15        14    34   <NA>
16    16        15    36   <NA>
17    17         7    28   <NA>
18    18        17    30   <NA>
19    19        18    34   <NA>
20    20        19    36   <NA>
21    21        20    37   <NA>
22    22        19    36   <NA>
23    23         2    38     po
24    24         4    38     se
25    25         5    38     sc
26    26         5    38     sn
27    27         6    38     wb
28    28         6    38     wa
29    29        10    38     be
30    30        11    38     bn
31    31        11    38     bc
32    32        12    38     lb
33    33        12    38     la
34    34        13    38     nu
35    35        14    38     sa
36    36        15    38     gb
37    37        16    38     ga
38    38        16    38     gm
39    39        17    38     oc
40    40        18    38     fe
41    41        20    38     li
42    42        21    38     mg
43    43        21    38     md
44    44        22    38     t1
45    45        22    38     t2

ouch documentation built on May 2, 2019, 6:53 p.m.