add_ci: Draw Confidences Intervals on Phylogenies

View source: R/draw_CI.R

add_ciR Documentation

Draw Confidences Intervals on Phylogenies

Description

These are low-level plotting commands to draw the confidence intervals on the node of a tree as rectangles with coloured backgrounds or add boxplots to ultrametric or tipdated trees.

Usage

add_ci(tree, trees, col95 = "#FF00004D", col50 = "#0000FF4D",
  height = 0.7, legend = TRUE, ...)

add_boxplot(tree, trees, ...)

Arguments

tree

a phylogenetic tree to which the confidences should be added.

trees

phylogenetic trees, i.e. an object of class 'multiPhylo'

col95

colour used for the 95 red.

col50

colour used for the 50 blue.

height

the height of the boxes.

legend

a logical value.

...

arguments passed to other functions, legend or bxp.

Details

All trees should to be rooted, either ultrametric or tip dated.

Value

Nothing. Function is called for adding to a plot.

Author(s)

Emmanuel Paradis, Santiago Claramunt, Joseph Brown, Klaus Schliep

See Also

plot.phylo, plotBS, add_edge_length, maxCladeCred

Examples

data("Laurasiatherian")
dm <- dist.hamming(Laurasiatherian)
tree <- upgma(dm)
set.seed(123)
trees <- bootstrap.phyDat(Laurasiatherian,
                          FUN=function(x)upgma(dist.hamming(x)), bs=100)
tree <- plotBS(tree, trees, "phylogram")
add_ci(tree, trees, bty="n")
plot(tree, direction="downwards")
add_boxplot(tree, trees, boxwex=.7)

KlausVigo/phangorn documentation built on Nov. 20, 2024, 12:47 p.m.