[Vegan-commits] r736 - in pkg/vegan: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 11 18:13:39 CET 2009


Author: jarioksa
Date: 2009-03-11 18:13:38 +0100 (Wed, 11 Mar 2009)
New Revision: 736

Modified:
   pkg/vegan/R/metaMDSdist.R
   pkg/vegan/inst/ChangeLog
Log:
metaMDSdist issues a warning if stepacross is used with open-ended dissimilarities (Euclidean, Manhattan etc.)

Modified: pkg/vegan/R/metaMDSdist.R
===================================================================
--- pkg/vegan/R/metaMDSdist.R	2009-03-10 20:15:09 UTC (rev 735)
+++ pkg/vegan/R/metaMDSdist.R	2009-03-11 17:13:38 UTC (rev 736)
@@ -40,6 +40,10 @@
     if (noshare > 0 && sum(tmp <- no.shared(comm))/length(dis) > noshare) {
         if (trace) 
             cat("Using step-across dissimilarities:\n")
+        rn <- range(dis[tmp])
+        if (rn[2]/rn[1] > 1.01)
+            warning("non-constant distances between points with nothing shared\n",
+                    "  stepacross may be meaningless: consider argument 'noshare=0'")
         is.na(dis) <- tmp
         dis <- stepacross(dis, trace = trace, toolong=0, ...)
         if (length(unique(distconnected(tmp, trace = trace > 1))) > 1) 

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-03-10 20:15:09 UTC (rev 735)
+++ pkg/vegan/inst/ChangeLog	2009-03-11 17:13:38 UTC (rev 736)
@@ -5,8 +5,9 @@
 Version 1.16-15 (opened Mar 10, 2009)
 
 	* metaMDS: automatic stepacross works with Euclidean, Manhattan
-	and other distances with no fixed upper limit. Fixed after a query
-	to R-sig-ecology by Manuel Spinola.
+	and other distances with no fixed upper limit.  However, this may
+	be meaningless, and a warning is issued. Fixed after a query to
+	R-sig-ecology by Manuel Spinola.
 	
 Version 1.16-14 (closed Mar 10, 2009)
 



More information about the Vegan-commits mailing list