[Vegan-commits] r2973 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 5 15:02:12 CET 2015


Author: jarioksa
Date: 2015-11-05 15:02:11 +0100 (Thu, 05 Nov 2015)
New Revision: 2973

Modified:
   pkg/vegan/R/vegdist.R
Log:
Merge branch 'cran-2.3' into r-forge-svn-local

Modified: pkg/vegan/R/vegdist.R
===================================================================
--- pkg/vegan/R/vegdist.R	2015-10-23 09:33:00 UTC (rev 2972)
+++ pkg/vegan/R/vegdist.R	2015-11-05 14:02:11 UTC (rev 2973)
@@ -15,10 +15,10 @@
         stop("invalid distance method")
     if (method == -1) 
         stop("ambiguous distance method")
-    if (method > 2 && any(rowSums(x, na.rm = TRUE) == 0)) 
+    if (!method %in% c(1,2,6,16) && any(rowSums(x, na.rm = TRUE) == 0))
         warning("you have empty rows: their dissimilarities may be meaningless in method ",
                 dQuote(inm))
-    if (method > 2 && any(x < 0, na.rm = TRUE)) 
+    if (!method %in% c(1,2,6,16) && any(x < 0, na.rm = TRUE))
         warning("results may be meaningless because data have negative entries in method ",
                 dQuote(inm))
     if (method == 11 && any(colSums(x) == 0)) 



More information about the Vegan-commits mailing list