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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 16 13:43:03 CEST 2015


Author: jarioksa
Date: 2015-06-16 13:43:02 +0200 (Tue, 16 Jun 2015)
New Revision: 2952

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

Modified: pkg/vegan/R/adonis.R
===================================================================
--- pkg/vegan/R/adonis.R	2015-06-09 09:45:33 UTC (rev 2951)
+++ pkg/vegan/R/adonis.R	2015-06-16 11:43:02 UTC (rev 2952)
@@ -134,11 +134,11 @@
             stopCluster(parallel)
         ## Round to avoid arbitrary P-values with tied data
         f.perms <- round(f.perms, 12)
+        F.Mod <- round(F.Mod, 12)
         P <- (rowSums(t(f.perms) >= F.Mod)+1)/(permutations+1)
     } else { # no permutations
         f.perms <- P <- rep(NA, nterms)
     }
-    F.Mod <- round(F.Mod, 12)
     SumsOfSqs = c(SS.Exp.each, SS.Res, sum(SS.Exp.each) + SS.Res)
     tab <- data.frame(Df = c(df.Exp, df.Res, n-1),
                       SumsOfSqs = SumsOfSqs,

Modified: pkg/vegan/R/rarecurve.R
===================================================================
--- pkg/vegan/R/rarecurve.R	2015-06-09 09:45:33 UTC (rev 2951)
+++ pkg/vegan/R/rarecurve.R	2015-06-16 11:43:02 UTC (rev 2952)
@@ -2,6 +2,9 @@
     function(x, step = 1, sample, xlab = "Sample Size", ylab = "Species",
              label = TRUE, col, lty, ...)
 {
+    ## check input data: must be counts
+    if (!identical(all.equal(x, round(x)), TRUE))
+        stop("function accepts only integers (counts)")
     ## sort out col and lty
     if (missing(col))
         col <- par("col")



More information about the Vegan-commits mailing list