paint_phy: returns a phylogenetic tree painted for ouwie and data

Description Usage Arguments Value Examples

Description

returns a phylogenetic tree painted for ouwie and data

Usage

1
  paint_phy(phy, data, clades, show_plot = TRUE)

Arguments

phy

a phylogenetic tree of class phylo (ape)

clades:

a list of clades defined by species pairs, e.g. list(c(sp1, sp2), c(sp3, sp4)), or just a vector c(sp1, sp2) the descendents of the MRCA of sp1 and sp2 define the regime later clades are painted over earlier ones, so should be in order of nesting or otherwise non-overlapping.

data

the data.frame of characters (see data in ?treedata)

show_plot

logical, should I plot the resulting tree

Value

a list with the phy, updated to have regimes at node labels (for OUwie) and the data matrix formatted with regimes, for OUwie, and a list of colors corresponding to edges, that can be used for plotting.

Examples

1
2
3
4
5
6
data(labrids)
myphy <- paint_phy(ape.phy, ape.dat,
                   list(c("Bolbometopon_muricatum", "Sparisoma_radians"),
                   c("Chlorurus_sordidus", "Hipposcarus_longiceps")))
plot(myphy$phy, edge.color=myphy$colors, type="fan",
show.tip.label=FALSE, edge.width=2)

cboettig/wrightscape documentation built on May 13, 2019, 2:12 p.m.