[Vegan-commits] r2220 - in branches/2.0: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jun 17 20:04:06 CEST 2012


Author: jarioksa
Date: 2012-06-17 20:04:06 +0200 (Sun, 17 Jun 2012)
New Revision: 2220

Modified:
   branches/2.0/R/simper.R
   branches/2.0/inst/ChangeLog
Log:
cherrypick git rev cce42b3 from r2213: warn on empty rows in simper()

Modified: branches/2.0/R/simper.R
===================================================================
--- branches/2.0/R/simper.R	2012-06-14 09:41:56 UTC (rev 2219)
+++ branches/2.0/R/simper.R	2012-06-17 18:04:06 UTC (rev 2220)
@@ -1,6 +1,8 @@
 `simper` <-
     function(comm, group, ...)
 {
+    if (any(rowSums(comm, na.rm = TRUE) == 0)) 
+        warning("you have empty rows: results may be meaningless")
     permutations <- 0
     trace <- FALSE
     comm <- as.matrix(comm)
@@ -140,4 +142,4 @@
     if ((np <- attr(x, "permutations")) > 0)
         cat("P-values based on", np, "permutations\n")
     invisible(x)
-}
\ No newline at end of file
+}

Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog	2012-06-14 09:41:56 UTC (rev 2219)
+++ branches/2.0/inst/ChangeLog	2012-06-17 18:04:06 UTC (rev 2220)
@@ -6,6 +6,8 @@
 
 	* merge r2215: plot.envfit() gains args 'bg' for background colour
 	of labels.
+	* cherry-pick from r2213: warn on empty rows in simper (picked
+	github revision cce42b3).
 	* merge r2206,7: check 'newdata' dims in predict(..., type =
 	"response"|"working") for CA results.
 	* merge r2195-7, 2204: bias adjusted betadisper.



More information about the Vegan-commits mailing list