[Vegan-commits] r1428 - in pkg/vegan: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 31 08:53:30 CET 2010
Author: jarioksa
Date: 2010-12-31 08:53:23 +0100 (Fri, 31 Dec 2010)
New Revision: 1428
Modified:
pkg/vegan/R/metaMDS.R
pkg/vegan/inst/ChangeLog
pkg/vegan/man/metaMDS.Rd
Log:
metaMDS tries to detect non-community data and adjust her behaviour
Modified: pkg/vegan/R/metaMDS.R
===================================================================
--- pkg/vegan/R/metaMDS.R 2010-12-18 19:50:03 UTC (rev 1427)
+++ pkg/vegan/R/metaMDS.R 2010-12-31 07:53:23 UTC (rev 1428)
@@ -4,6 +4,15 @@
plot = FALSE, previous.best, old.wa = FALSE, ...)
{
commname <- deparse(substitute(comm))
+ ## metaMDS was written for community data which should be all
+ ## positive. Check this here, and set arguments so that they are
+ ## suitable for non-negative data.
+ if (any(autotransform, noshare > 0, wascores) && any(comm < 0)) {
+ warning("'comm' has negative data: 'autotransform', 'noshare' and 'wascores' set to FALSE")
+ wascores <- FALSE
+ autotransform <- FALSE
+ noshare <- FALSE
+ }
if (inherits(comm, "dist")) {
dis <- comm
if (is.null(attr(dis, "method")))
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2010-12-18 19:50:03 UTC (rev 1427)
+++ pkg/vegan/inst/ChangeLog 2010-12-31 07:53:23 UTC (rev 1428)
@@ -6,7 +6,14 @@
* new version opened with the release of vegan 1.17-5 (submitted
Dec 17, 2010, released at CRAN on on Dec 18, 2010).
-
+
+ * metaMDS: function was written for community data with all
+ entries non-negative, but it is used increasingly often with other
+ data types with a risk of failure (especially in wascores()). Now
+ data are checked for negative entries, and arguments wascores,
+ autotransform and noshare are set to FALSE with negative data
+ entries. Triggered by email queries and problem reports.
+
Version 1.18-18 (closed December 17, 2010)
* mantel.correlog: proper treatment of ties in permutation
Modified: pkg/vegan/man/metaMDS.Rd
===================================================================
--- pkg/vegan/man/metaMDS.Rd 2010-12-18 19:50:03 UTC (rev 1427)
+++ pkg/vegan/man/metaMDS.Rd 2010-12-31 07:53:23 UTC (rev 1428)
@@ -254,7 +254,15 @@
not save the used dissimilarity matrix, but \code{metaMDSredist}
tries to reconstruct the used dissimilarities with original data
transformation and possible \code{\link{stepacross}}.
+
+ The \code{metaMDS} function was designed to be used with community
+ data. If you have other type of data, you should probably set some
+ arguments to non-default values: probably at least \code{wascores},
+ \code{autotransform} and \code{noshare} should be \code{FALSE}. If
+ you have negative data entries, \code{metaMDS} will set the previous
+ to \code{FALSE} with a warning.
}
+
\section{Warning}{
The calculation of \code{\link{wascores}} for species was changed in
\pkg{vegan} version 1.12-6. They are now based on the community data
More information about the Vegan-commits
mailing list