[Vegan-commits] r1932 - in branches/2.0: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 5 15:18:06 CEST 2011
Author: jarioksa
Date: 2011-10-05 15:18:05 +0200 (Wed, 05 Oct 2011)
New Revision: 1932
Modified:
branches/2.0/R/metaMDSiter.R
branches/2.0/R/permutest.cca.R
branches/2.0/inst/ChangeLog
branches/2.0/inst/NEWS.Rd
Log:
merge r1927 (reset metaMDS when previous.best changed) and r1982 (permutest.cca result updating)
Modified: branches/2.0/R/metaMDSiter.R
===================================================================
--- branches/2.0/R/metaMDSiter.R 2011-10-05 12:33:34 UTC (rev 1931)
+++ branches/2.0/R/metaMDSiter.R 2011-10-05 13:18:05 UTC (rev 1932)
@@ -30,9 +30,6 @@
else if (nc < k)
for (i in 1:(k-nc))
init <- cbind(init, runif(NROW(init), -0.1, 0.1))
- ## zero 'tries' if started from different no. of dims
- if (inherits(previous.best, "metaMDS") && nc != k)
- previous.best$tries <- 0
if (trace)
cat(gettextf("Starting from %d-dimensional configuration\n", nc))
} else {
@@ -42,6 +39,13 @@
s0 <- switch(engine,
"monoMDS" = monoMDS(dist, y = init, k = k, maxit = 0, ...),
"isoMDS" = isoMDS(dist, y = init, k = k, maxit = 0))
+ ## Check whether model changed
+ if (is.list(previous.best) && !is.null(previous.best$stress) &&
+ !isTRUE(all.equal(previous.best$stress, s0$stress))) {
+ if (trace) cat("Stress differs from 'previous.best': reset tries\n")
+ if (inherits(previous.best, "metaMDS"))
+ previous.best$tries <- 0
+ }
} else {
## no previous.best: start with cmdscale
s0 <- switch(engine,
Modified: branches/2.0/R/permutest.cca.R
===================================================================
--- branches/2.0/R/permutest.cca.R 2011-10-05 12:33:34 UTC (rev 1931)
+++ branches/2.0/R/permutest.cca.R 2011-10-05 13:18:05 UTC (rev 1932)
@@ -101,7 +101,9 @@
## numerical inaccuracy
F.0 <- round(F.0, 12)
F.perm <- round(F.perm, 12)
- sol <- list(call = match.call(), testcall = x$call, model = model,
+ Call <- match.call()
+ Call[[1]] <- as.name("permutest")
+ sol <- list(call = Call, testcall = x$call, model = model,
F.0 = F.0, F.perm = F.perm, chi = c(Chi.z, Chi.xz),
num = num, den = den, df = c(q, r), nperm = permutations,
method = x$method, first = first, Random.seed = seed)
Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog 2011-10-05 12:33:34 UTC (rev 1931)
+++ branches/2.0/inst/ChangeLog 2011-10-05 13:18:05 UTC (rev 1932)
@@ -4,6 +4,9 @@
Version 2.0-1 (opened September 8, 2011)
+ * merge r1928: permutest.cca result could not be update()d.
+ * merge r1927: reset 'tries' when 'previous.best' was a different
+ model.
* merge r1916: ordisurf.Rd references.
* merge r1914: example speed-up.
* r1897, 1840, 1825, 1823: copy clamtest (at r1897),
Modified: branches/2.0/inst/NEWS.Rd
===================================================================
--- branches/2.0/inst/NEWS.Rd 2011-10-05 12:33:34 UTC (rev 1931)
+++ branches/2.0/inst/NEWS.Rd 2011-10-05 13:18:05 UTC (rev 1932)
@@ -34,10 +34,17 @@
especially when the \code{grouping} was numerical. The problem
was reported by Dr Miguel Alvarez (Univ. Bonn).
+ \item \code{metaMDS} did not reset \code{tries} when a new model
+ was started with a \code{previous.best} solution from a different
+ model.
+
\item Function \code{permatswap} for community null models using
quantitative swap never swapped items in a \eqn{2 \times 2}{2 by 2}
submatrix if all cells were filled.
+ \item The result from \code{permutest.cca} could not be
+ \code{update}d because of a \file{NAMESPACE} issue.
+
}
} % end BUG FIXES
} % end version 2.0-1
@@ -48,7 +55,7 @@
\item Peter Minchin joins the \pkg{vegan} team.
- \item \pkg{vegan} implements standard \R \code{NAMESPACE}. In
+ \item \pkg{vegan} implements standard \R \file{NAMESPACE}. In
general, \code{S3} methods are not exported which means that you
cannot directly use or see contents of functions like
\code{cca.default}, \code{plot.cca} or \code{anova.ccabyterm}. To
More information about the Vegan-commits
mailing list