multiple lines with different numbers of lines and/or with
comments inserted within the trees).
+ o ltt.plot(), ltt.lines(), and mltt.plot() did not count correctly
+ the number of lineages with non-binary trees.
+
CHANGES IN APE VERSION 2.2-2
Package: ape
Version: 2.2-3
-Date: 2008-11-24
+Date: 2008-12-20
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong,
Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel,
-## ltt.plot.R (2008-02-22)
+## ltt.plot.R (2008-12-20)
## Lineages Through Time Plot
ltt.plot <- function(phy, xlab = "Time", ylab = "N", ...)
{
if (class(phy) != "phylo") stop('object "phy" is not of class "phylo"')
+ if (!is.binary.tree(phy)) phy <- multi2di(phy)
time <- sort(branching.times(phy), decreasing = TRUE)
N <- 1:(length(time) + 1)
plot.default(-c(time, 0), N, xlab = xlab, ylab = ylab,
ltt.lines <- function(phy, ...)
{
+ if (!is.binary.tree(phy)) phy <- multi2di(phy)
time <- sort(branching.times(phy), decreasing = TRUE)
N <- 1:(length(time) + 1)
lines(-c(time, 0), N, type = "S", ...)
xlab = "Time", ylab = "N", log = "")
{
ltt.xy <- function(phy) {
+ if (!is.binary.tree(phy)) phy <- multi2di(phy)
x <- -c(sort(branching.times(phy), decreasing = TRUE), 0)
names(x) <- NULL
y <- 1:length(x)