ape2ouch {geiger}R Documentation

Convert between ape and ouch formats

Description

Converts phylogenetic trees between ape format (used by geiger, ape, and laser packages) and ouch format (used by the ouch package)

Usage

ape2ouch(phy, data)

Arguments

phy Phylogenetic tree in ape format
data Data vector with names that match tip species

Value

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

Author(s)

Luke J. Harmon

References

Geiger2

Examples

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)


[Package geiger version 0.2-6 Index]