[Vegan-commits] r279 - in pkg: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Mar 24 07:26:17 CET 2008
Author: jarioksa
Date: 2008-03-24 07:26:17 +0100 (Mon, 24 Mar 2008)
New Revision: 279
Modified:
pkg/R/metaMDS.R
pkg/inst/ChangeLog
Log:
plot.procrustes sometimes failed when two configurations are identical
Modified: pkg/R/metaMDS.R
===================================================================
--- pkg/R/metaMDS.R 2008-03-24 06:01:19 UTC (rev 278)
+++ pkg/R/metaMDS.R 2008-03-24 06:26:17 UTC (rev 279)
@@ -1,7 +1,7 @@
`metaMDS` <-
function (comm, distance = "bray", k = 2, trymax = 20, autotransform = TRUE,
noshare = 0.1, wascores = TRUE, expand = TRUE, trace = 1,
- plot = FALSE, previous.best, ...)
+ plot = FALSE, previous.best, old.wa = FALSE, ...)
{
commname <- deparse(substitute(comm))
if (inherits(comm, "dist"))
@@ -20,8 +20,11 @@
halfchange = (maxdis < 1.1), ...)
if (is.null(rownames(points)))
rownames(points) <- rownames(comm)
- if (wascores)
+ if (wascores) {
+ if (!old.wa)
+ comm <- eval.parent(parse(text=attr(dis, "commname")))
wa <- wascores(points, comm, expand = expand)
+ }
else
wa <- NA
out$points <- points
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2008-03-24 06:01:19 UTC (rev 278)
+++ pkg/inst/ChangeLog 2008-03-24 06:26:17 UTC (rev 279)
@@ -4,6 +4,9 @@
Version 1.12-5 (opened Mar 20, 2008)
+ * plot.procrustes: could fail if compared configurations were
+ numerically identical.
+
* allPerms: New function to enumerate all possible permutations
for a given permutation scheme and number of samples. Has 'print'
and 'summary' methods.
More information about the Vegan-commits
mailing list