]> git.donarmstrong.com Git - ape.git/commitdiff
fixed sh.test() for ape 2.2-1
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Fri, 11 Jul 2008 15:44:44 +0000 (15:44 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Fri, 11 Jul 2008 15:44:44 +0000 (15:44 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@43 6e262413-ae40-0410-9e79-b911bd7a66b7

Changes
DESCRIPTION
R/sh.test.R

diff --git a/Changes b/Changes
index 2392e8a4a873be99cd4391785326d5e0a25b17b3..a99d5d528217a6585821ef5424a188ad11c4f68c 100644 (file)
--- 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
 
index 6b1df814b9c1e33a76485ae485104321dc0a4484..c40a448d269df9e2a02580b6531edfbd70f69e16 100644 (file)
@@ -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,
index 1c814b16f1dec47218d3c545f8152453ab6e547b..11950a574a950cdc7219a4d5a66ef8035c953318 100644 (file)
@@ -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")
     }