ape2ouch {geiger} | R Documentation |
Converts phylogenetic trees between ape format (used by geiger, ape, and laser packages) and ouch format (used by the ouch package)
ape2ouch(phy, data)
phy |
Phylogenetic tree in ape format |
data |
Data vector with names that match tip species |
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
Geiger2
data(geospiza) attach(geospiza) name.check(geospiza.data, geospiza.tree)->r drop.tip(geospiza.tree, r[[1]])->g.tree data<-geospiza.data[,1] names(data)<-rownames(geospiza.data) ape2ouch(g.tree, data)->geospiza.ouch #Interface with ouch package library(ouch) brown.fit(geospiza.ouch$d, geospiza.ouch$node, geospiza.ouch$ancestor, geospiza.ouch$time)