From: paradis Date: Tue, 19 Oct 2010 14:38:43 +0000 (+0000) Subject: a few changes and one bug fix X-Git-Url: https://git.donarmstrong.com/?p=ape.git;a=commitdiff_plain;h=a8d86ed3981c64b6d20316d54d3ed4d02c2b887e a few changes and one bug fix git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@132 6e262413-ae40-0410-9e79-b911bd7a66b7 --- diff --git a/ChangeLog b/ChangeLog index 05ff241..b4a7e8a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ BUG FIXES + o as.list.DNAbin() did not work correctly with vectors. + o as.hclust.phylo() failed with trees with node labels (thanks to Filipe Vieira for the fix). diff --git a/DESCRIPTION b/DESCRIPTION index 014fd6f..e165f27 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ape Version: 2.6-1 -Date: 2010-09-30 +Date: 2010-10-19 Title: Analyses of Phylogenetics and Evolution Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Klaus Schliep, Korbinian Strimmer, Damien de Vienne Maintainer: Emmanuel Paradis diff --git a/R/DNA.R b/R/DNA.R index a728517..722f7b4 100644 --- a/R/DNA.R +++ b/R/DNA.R @@ -1,4 +1,4 @@ -## DNA.R (2010-09-01) +## DNA.R (2010-10-19) ## Manipulations and Comparisons of DNA Sequences @@ -94,7 +94,7 @@ as.matrix.DNAbin <- function(x, ...) as.list.DNAbin <- function(x, ...) { if (is.list(x)) return(x) - if (is.vector(x)) obj <- list(x) + if (is.null(dim(x))) obj <- list(x) # cause is.vector() doesn't work else { # matrix n <- nrow(x) obj <- vector("list", n) diff --git a/R/birthdeath.R b/R/birthdeath.R index 82decda..4c65ecd 100644 --- a/R/birthdeath.R +++ b/R/birthdeath.R @@ -1,4 +1,4 @@ -## birthdeath.R (2009-05-10) +## birthdeath.R (2010-10-17) ## Estimation of Speciation and Extinction Rates ## with Birth-Death Models @@ -6,7 +6,7 @@ ## birthdeath: standard model ## bd.ext: extended version -## Copyright 2002-2009 Emmanuel Paradis +## Copyright 2002-2010 Emmanuel Paradis ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. @@ -17,6 +17,7 @@ birthdeath <- function(phy) N <- length(phy$tip.label) x <- c(NA, branching.times(phy)) dev <- function(a, r) { + if (r <= 0) return(1e50) -2 * (lfactorial(N - 1) + (N - 2) * log(r) + r * sum(x[3:N]) diff --git a/man/bd.time.Rd b/man/bd.time.Rd index 8cafdca..b33d8d0 100644 --- a/man/bd.time.Rd +++ b/man/bd.time.Rd @@ -58,8 +58,8 @@ bd.time(phy, birth, death, BIRTH = NULL, DEATH = NULL, }} \references{ Paradis, E. (2010) Time-dependent speciation and extinction from - phylogenies: a least squares approach. (under revision) - %\emph{Evolution}, \bold{59}, 1--12. + phylogenies: a least squares approach. \emph{Evolution} (in press) + %, \bold{59}, 1--12. } \author{Emmanuel Paradis} \seealso{ diff --git a/man/rlineage.Rd b/man/rlineage.Rd index dd36c0f..b2b1aed 100644 --- a/man/rlineage.Rd +++ b/man/rlineage.Rd @@ -49,8 +49,8 @@ drop.fossil(phy, tol = 0) process. \emph{Annals of Mathematical Statistics}, \bold{19}, 1--15. Paradis, E. (2010) Time-dependent speciation and extinction from - phylogenies: a least squares approach. (under revision) - %\emph{Evolution}, \bold{59}, 1--12. + phylogenies: a least squares approach. \emph{Evolution} (in press) + %, \bold{59}, 1--12. } \author{Emmanuel Paradis} \seealso{