From 8011113152e8e1913729d65383f258987db9452b Mon Sep 17 00:00:00 2001 From: paradis Date: Fri, 11 Jul 2008 15:44:44 +0000 Subject: [PATCH] fixed sh.test() for ape 2.2-1 git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@43 6e262413-ae40-0410-9e79-b911bd7a66b7 --- Changes | 2 ++ DESCRIPTION | 2 +- R/sh.test.R | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Changes b/Changes index 2392e8a..a99d5d5 100644 --- a/Changes +++ b/Changes @@ -33,6 +33,8 @@ BUG FIXES o read.nexus() failed to place correctly tip labels when reading a single tree with no edge lengths. + o A bug was fixed in sh.test(). + OTHER CHANGES diff --git a/DESCRIPTION b/DESCRIPTION index 6b1df81..c40a448 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: ape Version: 2.2-1 -Date: 2008-07-09 +Date: 2008-07-11 Title: Analyses of Phylogenetics and Evolution Author: Emmanuel Paradis, Ben Bolker, Julien Claude, Hoa Sien Cuong, Richard Desper, Benoit Durand, Julien Dutheil, Olivier Gascuel, diff --git a/R/sh.test.R b/R/sh.test.R index 1c814b1..11950a5 100644 --- a/R/sh.test.R +++ b/R/sh.test.R @@ -1,8 +1,8 @@ -## sh.test.R (2006-07-06) +## sh.test.R (2008-07-11) ## Shimodaira-Hasegawa Test -## Copyright 2006 Emmanuel Paradis +## Copyright 2006-2008 Emmanuel Paradis ## This file is part of the R-package `ape'. ## See the file ../COPYING for licensing issues. @@ -27,7 +27,7 @@ sh.test <- function(..., x, model = DNAmodel(), B = 100) ## Step 1: foo <- function(PHY) - attr(mlphylo(model, x, PHY, search.tree = FALSE, quiet = TRUE), "loglik") + attr(mlphylo(x, PHY, model, search.tree = FALSE, quiet = TRUE), "loglik") Talpha <- sapply(phy, foo) Talpha <- max(Talpha) - Talpha @@ -36,7 +36,7 @@ sh.test <- function(..., x, model = DNAmodel(), B = 100) for (i in 1:B) { boot.samp <- x[, sample(ncol(x), replace = TRUE)] for (j in 1:ntree) - M[j, i] <- attr(mlphylo(model, boot.samp, phy[[j]], + M[j, i] <- attr(mlphylo(boot.samp, phy[[j]], model, search.tree = FALSE, quiet = TRUE), "loglik") } -- 2.39.5