circular.time.slice: mcc2

Description Usage Arguments See Also Examples

View source: R/circular.time.slice.R

Description

Adds a circular time slice to a ploted phylo tree of type = "fan"

Usage

1
circular.time.slice(phy, start, end, col = "grey")

Arguments

phy

phylo tre object

start

start of the time slice (lower)

end

end of the time slice (upper)

col

choose color (default = "grey")

See Also

plot.phylo sp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
path <- system.file("data/mcc.tre", package="rBt")
tr <- read.beast.annot(path)
timerange <- range(branching.times(tr))
# equally spaced time slices
timeslices <- seq(timerange[1], timerange[2], length.out=5)
ts <- cbind(timeslices[-5], timeslices[-5]+((timeslices[3]-timeslices[2])/2))
# plot tree
plot(tr, type="fan", show.tip.label=F)
# add slice
for (i in 1:dim(ts)[1])
   circular.time.slice(tr, ts[i,1], ts[i,2])

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