[Vegan-commits] r500 - in pkg: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 16 21:49:09 CEST 2008


Author: jarioksa
Date: 2008-09-16 21:49:09 +0200 (Tue, 16 Sep 2008)
New Revision: 500

Modified:
   pkg/R/add1.cca.R
   pkg/R/drop1.cca.R
   pkg/man/add1.cca.Rd
Log:
add1/drop1.cca gained argument 'pstep' passed as 'step' to anova.cca (step() has 'steps' that shadows 'step')

Modified: pkg/R/add1.cca.R
===================================================================
--- pkg/R/add1.cca.R	2008-09-15 15:28:39 UTC (rev 499)
+++ pkg/R/add1.cca.R	2008-09-16 19:49:09 UTC (rev 500)
@@ -1,6 +1,6 @@
 `add1.cca`<-
     function(object, scope, test = c("none", "permutation"),
-             perm.max = 200, ...)
+             pstep = 100, perm.max = 200, ...)
 {
     test <- match.arg(test)
     ## Default add1
@@ -25,7 +25,7 @@
             else
                 nfit <- update(object,
                                as.formula(paste(". ~ . +", tt)))
-            tmp <- anova(nfit, perm.max = perm.max, ...)
+            tmp <- anova(nfit, step = pstep, perm.max = perm.max, ...)
             adds[i+1,] <- unlist(tmp[1,3:5])
         }
         colnames(adds) <- colnames(tmp)[3:5]

Modified: pkg/R/drop1.cca.R
===================================================================
--- pkg/R/drop1.cca.R	2008-09-15 15:28:39 UTC (rev 499)
+++ pkg/R/drop1.cca.R	2008-09-16 19:49:09 UTC (rev 500)
@@ -1,6 +1,6 @@
 `drop1.cca` <-
     function(object, scope, test = c("none", "permutation"),
-             perm.max = 200, ...)
+             pstep = 100, perm.max = 200, ...)
 {
     test <- match.arg(test)
     out <- NextMethod("drop1", object, test="none", ...)
@@ -9,8 +9,8 @@
         rn <- rownames(out)[-1]
         if (missing(scope))
             scope <- rn
-        adds <- anova(object, by = "margin", perm.max = perm.max,
-                      scope = scope, ...)
+        adds <- anova(object, by = "margin", step = pstep,
+                      perm.max = perm.max, scope = scope, ...)
         nr <- nrow(adds)
         out <- cbind(out, rbind(NA, adds[rn,3:5]))
         class(out) <- cl

Modified: pkg/man/add1.cca.Rd
===================================================================
--- pkg/man/add1.cca.Rd	2008-09-15 15:28:39 UTC (rev 499)
+++ pkg/man/add1.cca.Rd	2008-09-16 19:49:09 UTC (rev 500)
@@ -9,9 +9,9 @@
 }
 \usage{
 \method{add1}{cca}(object, scope, test = c("none", "permutation"),
-    perm.max = 200, ...)
+    pstep = 100, perm.max = 200, ...)
 \method{drop1}{cca}(object, scope, test = c("none", "permutation"), 
-    perm.max = 200, ...)
+    pstep = 100, perm.max = 200, ...)
 }
 
 \arguments{
@@ -20,6 +20,8 @@
   \item{scope}{ A formula giving the terms to be considered for adding
   or dropping; see \code{\link{add1}} for details.}
   \item{test}{ Should a permutation test added using \code{\link{anova.cca}}. }
+  \item{pstep}{Number of permutations in one step, passed as argument
+  \code{step} to \code{\link{anova.cca}}.}
   \item{perm.max}{ Maximum number of permutation in \code{\link{anova.cca}}. }
   \item{\dots}{Other arguments passed to \code{\link{add1.default}},
   \code{\link{drop1.default}}, and \code{\link{anova.cca}}.}



More information about the Vegan-commits mailing list