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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 27 13:36:17 CEST 2010


Author: jarioksa
Date: 2010-05-27 13:36:16 +0200 (Thu, 27 May 2010)
New Revision: 1195

Modified:
   pkg/vegan/R/adonis.R
   pkg/vegan/R/anosim.R
   pkg/vegan/R/factorfit.R
   pkg/vegan/R/vectorfit.R
   pkg/vegan/inst/ChangeLog
Log:
revert 1193 and get back r846: *no* patronizing if (permutations %% 100 == 0) permutations <- permutations - 1

Modified: pkg/vegan/R/adonis.R
===================================================================
--- pkg/vegan/R/adonis.R	2010-05-25 11:16:49 UTC (rev 1194)
+++ pkg/vegan/R/adonis.R	2010-05-27 11:36:16 UTC (rev 1195)
@@ -8,11 +8,6 @@
     ## variables.  data is the data frame from which A, B, and C would
     ## be drawn.
     TOL <- 1e-7
-    ## Set no. of permutations to x-1 if x is an even hundred
-    if (permutations %% 100 == 0) {
-        permutations <- permutations - 1
-        warning("Setting no. of permutations to ", permutations)
-    }
     Terms <- terms(formula, data = data)
     lhs <- formula[[2]]
     lhs <- eval(lhs, data, parent.frame()) # to force evaluation 

Modified: pkg/vegan/R/anosim.R
===================================================================
--- pkg/vegan/R/anosim.R	2010-05-25 11:16:49 UTC (rev 1194)
+++ pkg/vegan/R/anosim.R	2010-05-27 11:36:16 UTC (rev 1195)
@@ -28,8 +28,6 @@
     cl.vec[within] <- levels(grouping)[grouping[take]]
     cl.vec <- factor(cl.vec, levels = c("Between", levels(grouping)))
     if (permutations) {
-        if (permutations %% 100 == 0)
-            permutations <- permutations - 1
         perm <- rep(0, permutations)
         for (i in 1:permutations) {
             take <- permuted.index(N, strata)

Modified: pkg/vegan/R/factorfit.R
===================================================================
--- pkg/vegan/R/factorfit.R	2010-05-25 11:16:49 UTC (rev 1194)
+++ pkg/vegan/R/factorfit.R	2010-05-27 11:36:16 UTC (rev 1195)
@@ -28,8 +28,6 @@
         r.this <- 1 - invar/totvar
         r <- c(r, r.this)
         if (permutations) {
-            if (permutations %% 100 == 0)
-                permutations <- permutations - 1
             A <- as.integer(P[[i]])
             NL <- nlevels(P[[i]])
             tmp <- rep(NA, permutations)

Modified: pkg/vegan/R/vectorfit.R
===================================================================
--- pkg/vegan/R/vectorfit.R	2010-05-25 11:16:49 UTC (rev 1194)
+++ pkg/vegan/R/vectorfit.R	2010-05-27 11:36:16 UTC (rev 1195)
@@ -24,8 +24,6 @@
         colnames(heads) <- paste("Dim", 1:nc, sep = "")
     else colnames(heads) <- colnames(X)
     if (permutations) {
-        if (permutations %% 100 == 0)
-            permutations <- permutations - 1
         nr <- nrow(X)
         permstore <- matrix(nrow = permutations, ncol = ncol(P))
         for (i in 1:permutations) {

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2010-05-25 11:16:49 UTC (rev 1194)
+++ pkg/vegan/inst/ChangeLog	2010-05-27 11:36:16 UTC (rev 1195)
@@ -3,11 +3,6 @@
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
 
 Version 1.18-5 (opened May 21, 2010) 
-
-	* revert patch 846: put back patronizing adjustment of the number
-	permutations to n-1 if n requested was an even hundred (i.e., do
-	99 if 100 were asked). Concerns mantel, factorfit, vectofirt,
-	adonis and anosim.
 	
 	* ordiR2step: new function to perform forward model selection
 	following Blanchet, Legendre & Borcard (Ecology 89, 2623-2632;



More information about the Vegan-commits mailing list