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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 18 14:53:18 CET 2011


Author: jarioksa
Date: 2011-03-18 14:53:18 +0100 (Fri, 18 Mar 2011)
New Revision: 1548

Modified:
   pkg/vegan/R/metaMDSiter.R
Log:
zero tries if metaMDS result was used to start a new analysis

Modified: pkg/vegan/R/metaMDSiter.R
===================================================================
--- pkg/vegan/R/metaMDSiter.R	2011-03-18 10:28:23 UTC (rev 1547)
+++ pkg/vegan/R/metaMDSiter.R	2011-03-18 13:53:18 UTC (rev 1548)
@@ -31,6 +31,9 @@
                         init <- cbind(init, runif(NROW(init), -0.1, 0.1))
                 # evaluate isoMDS with stress
                 s0 <- isoMDS(dist, init, k = k, maxit = 0)
+                # zero 'tries': this was a new start
+                if (inherits(previous.best, "metaMDS"))
+                    previous.best$tries <- 0
                 if (trace)
                     cat(gettextf("Starting from %d-dimensional solution\n", nc))
             }



More information about the Vegan-commits mailing list