plotRECON: Plot ancestral state reconstructions

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

View source: R/plotRECON.R

Description

Plots maximum likelihood ancestral state estimates on tree

Usage

1
2
plotRECON(phy, likelihoods, piecolors=NULL, cex=0.5, pie.cex=0.25, file=NULL, 
height=11, width=8.5, show.tip.label=TRUE, title=NULL, ...)

Arguments

phy

a phylogenetic tree, in ape “phylo” format.

likelihoods

likelihoods for ancestral states (see Details).

piecolors

a vector of colors for states.

cex

specifies the size of the font for labels (if used).

pie.cex

specifies the size of the symbols to plot on tree.

file

filename to which a pdf is saved.

height

height of plot.

width

width of plot.

show.tip.label

a logical indicating whether to draw tip labels to tree. The default is TRUE.

title

an optional title for the plot.

...

Additional arguments to be passed to the plot device

Details

Plots ancestral state estimates on provided tree. The likelihoods can be the states of an object of class rayDISC or class corDISC, or the lik.anc of an object of class ace (from the ape package).

Value

A plot indicating the maximum likelihood ancestral states at each internal node.

Author(s)

Jeffrey C. Oliver

See Also

corDISC, rayDISC

Examples

1
2
3
4
5
6
7
8
9
# Not run
## Load data
# data(rayDISC.example)
## Perform ancestral state estimation, using a single rate of evolution and marginal 
## reconstruction of ancestral states
# recon <- rayDISC(rayDISC.example$tree,rayDISC.example$trait,model="ER",
# node.states="marginal")
## Plot reconstructions on tree
# plotRECON(rayDISC.example$tree,recon$states,title="rayDISC Example")

Example output

Loading required package: ape
Loading required package: nloptr
Loading required package: GenSA

corHMM documentation built on May 31, 2017, 2:09 a.m.