[Vegan-commits] r386 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 2 11:20:09 CEST 2008


Author: jarioksa
Date: 2008-06-02 11:20:09 +0200 (Mon, 02 Jun 2008)
New Revision: 386

Modified:
   pkg/R/ade2vegancca.R
Log:
Corrected calculation of wa scores in ade2ccavegan

Modified: pkg/R/ade2vegancca.R
===================================================================
--- pkg/R/ade2vegancca.R	2008-06-02 07:50:18 UTC (rev 385)
+++ pkg/R/ade2vegancca.R	2008-06-02 09:20:09 UTC (rev 386)
@@ -1,3 +1,4 @@
+
 `ade2vegancca` <-
     function(object)
 {
@@ -14,7 +15,7 @@
                 QR = NA,
                 envcentre = NA,
                 Xbar = NA)
-    CCA$wa <- sweep(CCA$wa.eig, 2, sqrt(object$eig[1:nf]), "*")
+    CCA$wa <- sweep(CCA$wa.eig, 2, 1/sqrt(object$eig[1:nf]), "*")
     out <- list(call = object$call,
                 grand.total = NA,
                 rowsum = object$lw,



More information about the Vegan-commits mailing list