]> git.donarmstrong.com Git - ape.git/commitdiff
fix to avoid uncessary warning in ace(method = "GLS")
authorparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Tue, 20 Jan 2009 09:16:20 +0000 (09:16 +0000)
committerparadis <paradis@6e262413-ae40-0410-9e79-b911bd7a66b7>
Tue, 20 Jan 2009 09:16:20 +0000 (09:16 +0000)
git-svn-id: https://svn.mpl.ird.fr/ape/dev/ape@61 6e262413-ae40-0410-9e79-b911bd7a66b7

ChangeLog
R/ace.R

index 6e2f4f15ac1ac7ee4619f2f18504019c1227f0b3..2f0520032bc344c213abd5fc40a276e305649e25 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,7 +3,9 @@
 BUG FIXES
 
     o The bug fix in read.nexus() in version 2.2-3 was wrong: this is
-      now fixed. (thanks to Peter Wragg for the fix!)
+      now fixed. (Thanks to Peter Wragg for the fix!)
+
+    o A warning message occurred for no reason with ace(method="GLS").
 
 
 OTHER CHANGES
diff --git a/R/ace.R b/R/ace.R
index a67e6cfbb7e4e05813ba134c7a0293ec46a9e4e9..c38faeb6bdb2ef2b8b489139a841b3b5a440adaf 100644 (file)
--- a/R/ace.R
+++ b/R/ace.R
@@ -1,8 +1,8 @@
-## ace.R (2008-03-10)
+## ace.R (2009-01-19)
 
 ##     Ancestral Character Estimation
 
-## Copyright 2005-2008 Emmanuel Paradis and Ben Bolker
+## Copyright 2005-2009 Emmanuel Paradis and Ben Bolker
 
 ## This file is part of the R-package `ape'.
 ## See the file ../COPYING for licensing issues.
@@ -102,7 +102,7 @@ did not match: the former were ignored in the analysis.')
             V <- corMatrix(Initialize(corStruct, data.frame(x)),
                            corr = FALSE)
             invV <- solve(V)
-            o <- gls(x ~ 1, correlation = Initialize(corStruct, data.frame(x)))
+            o <- gls(x ~ 1, data.frame(x), correlation = corStruct)
             GM <- o$coefficients
             obj$ace <- drop(varAY %*% invV %*% (x - GM) + GM)
             names(obj$ace) <- (nb.tip + 1):(nb.tip + nb.node)