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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jun 12 07:37:08 CEST 2009


Author: jarioksa
Date: 2009-06-12 07:37:07 +0200 (Fri, 12 Jun 2009)
New Revision: 867

Modified:
   pkg/vegan/R/capscale.R
Log:
capscale: fix rda adjustment of 0..1 scale indices

Modified: pkg/vegan/R/capscale.R
===================================================================
--- pkg/vegan/R/capscale.R	2009-06-11 23:10:17 UTC (rev 866)
+++ pkg/vegan/R/capscale.R	2009-06-12 05:37:07 UTC (rev 867)
@@ -46,7 +46,7 @@
         adjust <- 1
     }
     else {
-        adjust <- k
+        adjust <- sqrt(k)
     }
     nm <- attr(X, "Labels")
     ## cmdscale is only used if 'add = TRUE': it cannot properly
@@ -62,8 +62,6 @@
     X$points <- adjust * X$points
     if (adjust == 1)
         X$eig <- X$eig/k
-    else
-        X$eig <- adjust * X$eig
     neig <- min(which(X$eig < 0) - 1, sum(X$eig > EPS))
     sol <- X$points[, 1:neig]
     fla <- update(formula, sol ~ .)



More information about the Vegan-commits mailing list