o root() gains the options 'node' and 'resolve.root'
(FALSE by default) as well as its code being improved.
+ o mltt.plot() has now an option 'log' used in the same way
+ than in plot.default()
+
+
+BUG FIXES
+
+ o mltt.plot() failed to display the legend with an unnamed
+ list of trees.
+
+ o nodelabels() with pies now correcly uses the argument
+ 'cex' to draw symbols of different sizes (which has
+ worked already for thermometers).
+
+
+OTHER CHANGES
+
+ o The argument 'family' of compar.gee() can now be a function
+ as well as a character string.
+
CHANGES IN APE VERSION 2.1-1
Package: ape
Version: 2.1-2
-Date: 2008-02-11
+Date: 2008-02-21
Title: Analyses of Phylogenetics and Evolution
Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong,
Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel,
-## compar.gee.R (2008-01-14)
+## compar.gee.R (2008-02-21)
## Comparative Analysis with GEEs
corstr = "fixed", scale.fix = scale.fix,
scale.value = scale.value))
W <- geemod$naive.variance
- if (family == "binomial")
+ fname <-
+ if is.function(family) deparse(substitute(family)) else family
+ if (fname == "binomial")
W <- summary(glm(formula, family = quasibinomial, data = data))$cov.scaled
N <- geemod$nobs
dfP <- sum(phy$edge.length)*N / sum(diag(vcv.phylo(phy)))
-## dist.topo.R (2007-07-04)
+## dist.topo.R (2008-02-27)
## Topological Distances, Tree Bipartitions,
## Consensus Trees, and Bootstrapping Phylogenies
-## Copyright 2005-2007 Emmanuel Paradis
+## Copyright 2005-2008 Emmanuel Paradis
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
boot.phylo <- function(phy, x, FUN, B = 100, block = 1)
{
if (is.list(x)) {
- nm <- names(x)
- n <- length(x)
- x <- unlist(x)
- nL <- length(x)
- x <- matrix(x, n, nL/n, byrow = TRUE)
- rownames(x) <- nm
+ if (class(x) == "DNAbin") x <- as.matrix(x)
+ else {
+ nm <- names(x)
+ n <- length(x)
+ x <- unlist(x)
+ nL <- length(x)
+ x <- matrix(x, n, nL/n, byrow = TRUE)
+ rownames(x) <- nm
+ }
}
boot.tree <- vector("list", B)
for (i in 1:B) {
-## ltt.plot.R (2007-12-22)
+## ltt.plot.R (2008-02-22)
## Lineages Through Time Plot
-## Copyright 2002-2007 Emmanuel Paradis
+## Copyright 2002-2008 Emmanuel Paradis
## This file is part of the R-package `ape'.
## See the file ../COPYING for licensing issues.
if (class(phy) != "phylo") stop('object "phy" is not of class "phylo"')
time <- sort(branching.times(phy), decreasing = TRUE)
N <- 1:(length(time) + 1)
- plot(-c(time, 0), N, xlab = xlab, ylab = ylab,
- xaxs = "r", yaxs = "r", type = "S", ...)
+ plot.default(-c(time, 0), N, xlab = xlab, ylab = ylab,
+ xaxs = "r", yaxs = "r", type = "S", ...)
}
ltt.lines <- function(phy, ...)
}
mltt.plot <- function(phy, ..., dcol = TRUE, dlty = FALSE, legend = TRUE,
- xlab = "Time", ylab = "N")
+ xlab = "Time", ylab = "N", log = "")
{
ltt.xy <- function(phy) {
x <- -c(sort(branching.times(phy), decreasing = TRUE), 0)
} else { # a list of trees
TREES <- lapply(phy, ltt.xy)
names(TREES) <- names(phy)
+ if (is.null(names(TREES)))
+ names(TREES) <-
+ paste(deparse(substitute(phy)), "-", 1:length(TREES))
}
dts <- list(...)
n <- length(dts)
} else { # a list of trees
a <- lapply(dts[[i]], ltt.xy)
names(a) <- names(dts[[i]])
+ if (is.null(names(a)))
+ names(a) <-
+ paste(deparse(substitute(phy)), "-", 1:length(a))
}
TREES <- c(TREES, a)
}
xl <- c(min(unlist(lapply(TREES, function(x) min(x[, 1])))), 0)
yl <- c(1, max(unlist(lapply(TREES, function(x) max(x[, 2])))))
- plot(0, 0, type = "n", xlim = xl, ylim = yl, xaxs = "r", yaxs = "r",
- xlab = xlab, ylab = ylab)
+ plot.default(1, 1, type = "n", xlim = xl, ylim = yl, xaxs = "r",
+ yaxs = "r", xlab = xlab, ylab = ylab, log = log)
lty <- if (!dlty) rep(1, n) else 1:n
col <- if (!dcol) rep(1, n) else topo.colors(n)
-## nodelabels.R (2008-02-08)
+## nodelabels.R (2008-02-21)
## Labelling Trees
if (!is.null(pie)) {
if (is.vector(pie)) pie <- cbind(pie, 1 - pie)
xrad <- CEX * diff(par("usr")[1:2]) / 50
+ xrad <- rep(xrad, length(sel))
for (i in 1:length(sel))
floating.pie.asp(XX[i], YY[i], pie[i, ],
- radius = xrad, col = piecol)
+ radius = xrad[i], col = piecol)
}
if (!is.null(text)) text(XX, YY, text, adj = adj, col = col, ...)
if (!is.null(pch)) points(XX + adj[1] - 0.5, YY + adj[2] - 0.5,
\usage{
ltt.plot(phy, xlab = "Time", ylab = "N", ...)
ltt.lines(phy, ...)
-mltt.plot(phy, ..., dcol = TRUE, dlty = FALSE,
- legend = TRUE, xlab = "Time", ylab = "N")
+mltt.plot(phy, ..., dcol = TRUE, dlty = FALSE, legend = TRUE,
+ xlab = "Time", ylab = "N", log = ""))
}
\arguments{
\item{phy}{an object of class \code{"phylo"}; this could be an object
\code{FALSE}).}
\item{legend}{a logical specifying whether a legend should be
plotted.}
+ \item{log}{a character string specifying which axis(es) to be
+ log-transformed; must be one of the followings: \code{""},
+ \code{"x"}, \code{"y"}, or \code{"xy"}.}
}
\description{
These functions plot, on the current graphical device, the minimum