From b41db3e6053bfb0e4b9000d5de678d65a1af9670 Mon Sep 17 00:00:00 2001 From: paradis Date: Wed, 3 Feb 2010 17:38:10 +0000 Subject: [PATCH] fix rTraitDisc git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@111 6e262413-ae40-0410-9e79-b911bd7a66b7 --- ChangeLog | 23 ++++++++++++++++++++++- DESCRIPTION | 4 ++-- R/ace.R | 6 +++--- R/rTrait.R | 3 ++- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b8d7c84..b1246e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,14 @@ - CHANGES IN APE VERSION 2.5 + CHANGES IN APE VERSION 2.5-1 + + +BUG FIXES + + o rTraitDisc() did not use its 'freq' argument correctly (it was + multiplied with the rate matrix column-wise instead of row-wise). + + + + CHANGES IN APE VERSION 2.5 NEW FEATURES @@ -27,6 +37,11 @@ NEW FEATURES o The branch length score replaces the geodesic distance in dist.topo. + o Three new data sets are included: the gopher-lice data (gopher.D), + SO2 air pollution in 41 US cities (lmorigin.ex1, from Sokal & + Rohlf 1995), and some host-parasite specificity data + (lmorigin.ex2, from Legendre & Desdevises 2009). + BUG FIXES @@ -37,6 +52,12 @@ BUG FIXES to Otto Cordero for the fix). +OTHER CHANGES + + o The geodesic distance has been replaced by the branch length score + in dist.topo(). + + CHANGES IN APE VERSION 2.4-1 diff --git a/DESCRIPTION b/DESCRIPTION index 0b756c1..a71fe22 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ape -Version: 2.5 -Date: 2010-02-01 +Version: 2.5-1 +Date: 2010-02-03 Title: Analyses of Phylogenetics and Evolution Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, Gangolf Jobb, Christoph Heibl, Daniel Lawson, Vincent Lefort, Pierre Legendre, Jim Lemon, Yvonnick Noel, Johan Nylander, Rainer Opgen-Rhein, Korbinian Strimmer, Damien de Vienne Maintainer: Emmanuel Paradis diff --git a/R/ace.R b/R/ace.R index c9a4511..f728ee7 100644 --- a/R/ace.R +++ b/R/ace.R @@ -1,8 +1,8 @@ -## ace.R (2009-11-12) +## ace.R (2010-02-03) ## Ancestral Character Estimation -## Copyright 2005-2009 Emmanuel Paradis and Ben Bolker +## Copyright 2005-2010 Emmanuel Paradis and Ben Bolker ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. @@ -224,7 +224,7 @@ anova.ace <- function(object, ...) table <- data.frame(ll, df, ddf, dev, pchisq(dev, ddf, lower.tail = FALSE)) dimnames(table) <- list(1:length(X), c("Log lik.", "Df", - "Df change", "Deviance", + "Df change", "Resid. Dev", "Pr(>|Chi|)")) structure(table, heading = "Likelihood Ratio Test Table", class = c("anova", "data.frame")) diff --git a/R/rTrait.R b/R/rTrait.R index 3359df6..642591e 100644 --- a/R/rTrait.R +++ b/R/rTrait.R @@ -1,4 +1,4 @@ -## rTrait.R (2010-01-11) +## rTrait.R (2010-02-03) ## Trait Evolution @@ -59,6 +59,7 @@ rTraitDisc <- for (i in N:1) x[des[i]] <- model(x[anc[i]], el[i]) } else { diag(Q) <- -rowSums(Q) + freq <- rep(freq, each = k) for (i in N:1) { p <- matexpo(Q * freq * el[i])[x[anc[i]], ] x[des[i]] <- .Internal(sample(k, size = 1, FALSE, prob = p)) -- 2.39.2