[Vegan-commits] r2475 - in branches/2.0: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Mar 8 10:15:19 CET 2013
Author: jarioksa
Date: 2013-03-08 10:15:18 +0100 (Fri, 08 Mar 2013)
New Revision: 2475
Modified:
branches/2.0/R/metaMDSiter.R
branches/2.0/inst/ChangeLog
branches/2.0/man/metaMDS.Rd
Log:
handcraft r2447: set maxit in metaMDS
Modified: branches/2.0/R/metaMDSiter.R
===================================================================
--- branches/2.0/R/metaMDSiter.R 2013-03-08 08:44:34 UTC (rev 2474)
+++ branches/2.0/R/metaMDSiter.R 2013-03-08 09:15:18 UTC (rev 2475)
@@ -1,6 +1,6 @@
`metaMDSiter` <-
function (dist, k = 2, trymax = 20, trace = 1, plot = FALSE,
- previous.best, engine = "monoMDS", ...)
+ previous.best, engine = "monoMDS", maxit = 200, ...)
{
engine <- match.arg(engine, c("monoMDS", "isoMDS"))
if (engine == "isoMDS")
@@ -49,8 +49,10 @@
} 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))
+ "monoMDS" = monoMDS(dist, y = cmdscale(dist, k = k), k = k,
+ maxit = maxit, ...),
+ "isoMDS" = isoMDS(dist, k = k, trace = isotrace,
+ maxit = maxit))
}
if (trace)
cat("Run 0 stress", s0$stress, "\n")
@@ -58,9 +60,9 @@
while(tries < trymax) {
tries <- tries + 1
stry <- switch(engine,
- "monoMDS" = monoMDS(dist, k = k, maxit = 200, ...),
+ "monoMDS" = monoMDS(dist, k = k, maxit = maxit, ...),
"isoMDS" = isoMDS(dist, initMDS(dist, k = k), k = k,
- maxit = 200, tol = 1e-07, trace = isotrace))
+ maxit = maxit, tol = 1e-07, trace = isotrace))
if (trace) {
cat("Run", tries, "stress", stry$stress, "\n")
}
Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog 2013-03-08 08:44:34 UTC (rev 2474)
+++ branches/2.0/inst/ChangeLog 2013-03-08 09:15:18 UTC (rev 2475)
@@ -12,6 +12,7 @@
* merge r2452: plot/text.cca gained axis.bp = TRUE argument.
* merge r2448 (partly), 2449: print.monoMDS clearer about
convergence. Only this part merged: metaMDSiter untouched.
+ * handcraft r2447: metaMDSiter gained argument 'maxit'.
* merge r2443: edit cca.object.Rd.
* merge r2434: return wcmdscale object always with non-default
arguments.
Modified: branches/2.0/man/metaMDS.Rd
===================================================================
--- branches/2.0/man/metaMDS.Rd 2013-03-08 08:44:34 UTC (rev 2474)
+++ branches/2.0/man/metaMDS.Rd 2013-03-08 09:15:18 UTC (rev 2475)
@@ -41,7 +41,7 @@
noshare = TRUE, trace = 1, commname, zerodist = "ignore",
distfun = vegdist, ...)
metaMDSiter(dist, k = 2, trymax = 20, trace = 1, plot = FALSE,
- previous.best, engine = "monoMDS", ...)
+ previous.best, engine = "monoMDS", maxit = 200, ...)
initMDS(x, k=2)
postMDS(X, dist, pc=TRUE, center=TRUE, halfchange, threshold=0.8,
nthreshold=10, plot=FALSE, ...)
@@ -119,6 +119,11 @@
\item{distfun}{Dissimilarity function. Any function returning a
\code{dist} object and accepting argument \code{method} can be used
(but some extra arguments may cause name conflicts).}
+
+ \item{maxit}{Maximum number of iterations in the single NMDS run;
+ passed to the \code{engine} function \code{\link{monoMDS}} or
+ \code{\link[MASS]{isoMDS}}.}
+
\item{dist}{Dissimilarity matrix used in multidimensional scaling. }
\item{pc}{Rotate to principal components. }
\item{center}{Centre the configuration. }
More information about the Vegan-commits
mailing list