ape2ouch {geiger} | R Documentation |
Converts phylogenetic trees between ape 'phylo' format (used by geiger, ape, and laser packages) and ouch format (used by the ouch package). The OUCH package can be used for testing the Ornstein-Uhlenbeck model of evolution, among other things. If the tree and data file have taxa that don't match, they will be removed from the analysis.
ape2ouch(phy, data, data.names=NULL)
phy |
An object of class phylo |
data |
Data vector |
data.names |
Tip names for data vector that match tree species; ignored if data includes names |
ape2ouch
returns the phylogentic tree in ouch format as a list with the
following components:
d |
Phenotypic values in ouch format |
node |
Node list for a phylogenetic tree, ouch format |
ancestor |
Ancestor list for a phylogenetic tree, ouch format |
time |
Branch times for a phylogenetic tree, ouch format |
species |
Species names for a phylogenetic tree, ouch format |
Luke J. Harmon
Butler, M.A. and A.A. King, 2004. Phylogenetic comparative analysis: a modeling approach for adaptive evolution. American Naturalist 164:683-695.
data(geospiza) attach(geospiza) ape2ouch(geospiza.tree, geospiza.data[,1], rownames(geospiza.data))->geospiza.ouch #Interface with ouch package library(ouch) brown.fit(geospiza.ouch$d, geospiza.ouch$node, geospiza.ouch$ancestor, geospiza.ouch$time)