ltt.df.HPD: ltt.df.hpd

Description Usage Arguments Details Value Examples

Description

Produces a list with two data frames; one with mean node values that can be represented as points and or lines, and a another with 95 that can be represented as a polygon.

Usage

1

Arguments

phy

a phylo object read by read.annot.beast

Details

It's inteded use is to generate a format that is easily compatible with ggplot2 (see example).

Value

list object with 2 data frames, one for points and the other for polygons

Examples

1
2
3
4
5
6
7
8
file <- system.file("data/mcc.tre", package="rBt")
tr <- read.annot.beast(file)
# find the root node:
my_ltt <- ltt.df.hpd(tr)
library(ggplot2)
ggplot(my_ltt$points, aes(x=mean, y=N)) +
    geom_poly(data=my_ltt$poly, aes(x=x, y=y), fill="grey", alpha=0.5) +
    geom_point() + geom_line()

santiagosnchez/rBt documentation built on Aug. 9, 2021, 11:52 p.m.