[Vegan-commits] r674 - in pkg/vegan: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 26 14:51:28 CET 2009
Author: jarioksa
Date: 2009-01-26 14:51:28 +0100 (Mon, 26 Jan 2009)
New Revision: 674
Modified:
pkg/vegan/R/metaMDSdist.R
pkg/vegan/inst/ChangeLog
Log:
metaMDSdist: do not evaluate no.shared() if set noshare=0
Modified: pkg/vegan/R/metaMDSdist.R
===================================================================
--- pkg/vegan/R/metaMDSdist.R 2009-01-26 13:31:00 UTC (rev 673)
+++ pkg/vegan/R/metaMDSdist.R 2009-01-26 13:51:28 UTC (rev 674)
@@ -37,13 +37,13 @@
}
}
maxdis <- max(dis)
- if (sum(tmp <- no.shared(comm))/length(dis) > noshare && noshare > 0) {
+ if (noshare > 0 && sum(tmp <- no.shared(comm))/length(dis) > noshare) {
if (trace)
cat("Using step-across dissimilarities:\n")
dis <- stepacross(dis, trace = trace, ...)
+ if (length(unique(distconnected(tmp, trace = trace > 1))) > 1)
+ warning("Data are disconnected, results may be meaningless")
}
- if (length(unique(distconnected(tmp, trace = trace > 1))) > 1)
- warning("Data are disconnected, results may be meaningless")
attr(dis, "maxdis") <- maxdis
attr(dis, "commname") <- commname
attr(dis, "function") <- distname
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2009-01-26 13:31:00 UTC (rev 673)
+++ pkg/vegan/inst/ChangeLog 2009-01-26 13:51:28 UTC (rev 674)
@@ -4,6 +4,9 @@
Version 1.6-10 (openen Jan 20, 2009)
+ * metaMDS: really do not evaluate no.shared() if set
+ noshare=0. Triggered by a problem report with missing data.
+
* vegdist doc: Morisita and Horn-Morisita were given as
similarities in the help.
More information about the Vegan-commits
mailing list