[Vegan-commits] r1175 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Mar 14 12:24:40 CET 2010


Author: jarioksa
Date: 2010-03-14 12:24:39 +0100 (Sun, 14 Mar 2010)
New Revision: 1175

Modified:
   pkg/vegan/R/scores.rda.R
Log:
code clean-up

Modified: pkg/vegan/R/scores.rda.R
===================================================================
--- pkg/vegan/R/scores.rda.R	2010-03-14 07:06:42 UTC (rev 1174)
+++ pkg/vegan/R/scores.rda.R	2010-03-14 11:24:39 UTC (rev 1175)
@@ -36,7 +36,7 @@
             v <- sweep(v, 2, scal, "*")
             if (scaling < 0) {
                 v <- sweep(v, 1, x$colsum, "/")
-                v <- v * sqrt(x$tot.chi / (max(nrow(x$CA$u), nrow(x$CCA$u)) - 1 ))
+                v <- v * sqrt(sumev / (nr - 1))
             }
             v <- const * v
         }



More information about the Vegan-commits mailing list