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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Apr 8 09:31:40 CEST 2011


Author: jarioksa
Date: 2011-04-08 09:31:40 +0200 (Fri, 08 Apr 2011)
New Revision: 1579

Modified:
   pkg/vegan/R/metaMDSiter.R
Log:
fix previous.start

Modified: pkg/vegan/R/metaMDSiter.R
===================================================================
--- pkg/vegan/R/metaMDSiter.R	2011-04-07 19:23:10 UTC (rev 1578)
+++ pkg/vegan/R/metaMDSiter.R	2011-04-08 07:31:40 UTC (rev 1579)
@@ -42,11 +42,12 @@
         s0 <- switch(engine,
                      "monoMDS" = monoMDS(dist, y = init, k = k, maxit = 0, ...),
                      "isoMDS" = isoMDS(dist, y = init, k = k, maxit = 0))
+    } else {
+        ## no previous.best: start with cmdscale
+        s0 <- switch(engine,
+                 "monoMDS" = monoMDS(dist, y = cmdscale(dist, k = k), k = k, ...),
+                 "isoMDS" = isoMDS(dist, k = k, trace = isotrace))
     }
-    ## no previous.best: start with cmdscale
-    s0 <- switch(engine,
-                 "monoMDS" = monoMDS(dist, y = cmdscale(dist), k = k, ...),
-                 "isoMDS" = isoMDS(dist, k = k, trace = isotrace))
     if (trace) 
         cat("Run 0 stress", s0$stress, "\n")
     tries <- 0



More information about the Vegan-commits mailing list