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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 3 19:37:39 CET 2013


Author: jarioksa
Date: 2013-12-03 19:37:39 +0100 (Tue, 03 Dec 2013)
New Revision: 2802

Modified:
   pkg/vegan/R/add1.cca.R
   pkg/vegan/R/drop1.cca.R
   pkg/vegan/R/ordistep.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/add1.cca.Rd
   pkg/vegan/man/anova.cca.Rd
   pkg/vegan/man/ordistep.Rd
Log:
stage 4 or new anova.cca: Pass examples in R CMD check, but still fail in inst/tests

Modified: pkg/vegan/R/add1.cca.R
===================================================================
--- pkg/vegan/R/add1.cca.R	2013-12-03 17:34:58 UTC (rev 2801)
+++ pkg/vegan/R/add1.cca.R	2013-12-03 18:37:39 UTC (rev 2802)
@@ -15,7 +15,7 @@
         if (!is.character(scope)) 
             scope <- add.scope(object, update.formula(object, scope))
         ns <- length(scope)
-        adds <- matrix(0, ns+1, 3)
+        adds <- matrix(0, ns+1, 2)
         adds[1, ] <- NA
         for (i in 1:ns) {
             tt <- scope[i]
@@ -28,9 +28,9 @@
                 nfit <- update(object,
                                as.formula(paste(". ~ . +", tt)))
             tmp <- anova(nfit,  permutations = permutations, ...)
-            adds[i+1,] <- unlist(tmp[1,3:5])
+            adds[i+1,] <- unlist(tmp[1,3:4])
         }
-        colnames(adds) <- colnames(tmp)[3:5]
+        colnames(adds) <- colnames(tmp)[3:4]
         out <- cbind(out, adds)
         class(out) <- cl
     }

Modified: pkg/vegan/R/drop1.cca.R
===================================================================
--- pkg/vegan/R/drop1.cca.R	2013-12-03 17:34:58 UTC (rev 2801)
+++ pkg/vegan/R/drop1.cca.R	2013-12-03 18:37:39 UTC (rev 2802)
@@ -16,7 +16,7 @@
         adds <- anova(object, by = "margin", scope = scope,
                       permutations = permutations, ...)
         nr <- nrow(adds)
-        out <- cbind(out, rbind(NA, adds[rn,3:5]))
+        out <- cbind(out, rbind(NA, adds[rn,3:4]))
         class(out) <- cl
     }
     out

Modified: pkg/vegan/R/ordistep.R
===================================================================
--- pkg/vegan/R/ordistep.R	2013-12-03 17:34:58 UTC (rev 2801)
+++ pkg/vegan/R/ordistep.R	2013-12-03 18:37:39 UTC (rev 2802)
@@ -68,8 +68,9 @@
         }
         ## Consider adding
         if (forward && length(scope$add)) {
-            aod <- add1(object, scope = scope$add, test = "perm", pstep = pstep,
-                        perm.max = perm.max, alpha = Pin, trace = trace, ...)
+            aod <- add1(object, scope = scope$add, test = "perm",
+                        permutations = permutations,
+                        alpha = Pin, trace = trace, ...)
             aod <- aod[-1,]
             o <- order(aod[,4], aod[,2])
             aod <- aod[o,]

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2013-12-03 17:34:58 UTC (rev 2801)
+++ pkg/vegan/inst/ChangeLog	2013-12-03 18:37:39 UTC (rev 2802)
@@ -4,10 +4,21 @@
 
 Version 2.1-40 (opened December 3, 2013)	
 	
-	* anova.cca: Function is now based on the new code, and the old
-	(deprecated) code is called ccanova. Except several functions to
-	fail while they depend on the old interface (certainly add1.cca,
-	drop1.cca, ordistep, ordiR2step). 
+	* anova.cca: Function is now based on the new code, but the old is
+	avaialable in a function called ccanova. The API changes:
+	arguments 'step' and 'perm.max' are gone and replaced with
+	'permutations' that accepts a how() object defining permutations,
+	or a single number like previously or a permutation matrix. The
+	new anova.cca adds an option of analysing a sequence of ordination
+	models. This also means that '...' is now the second argument and
+	the names of all arguments must be written in full. This change
+	can be expected to cause trouble outside vegan. Currently the
+	tests in examples are passed, but tests fail (looks like being
+	caused by the change in API). 
+
+	* add1.cca, drop1.cca, ordistep, ordiR2step: functions were
+	adapted to new anova.cca and this brought along similar changes in
+	API. 
 	
 Version 2.1-39 (closed December 3, 2013)
 

Modified: pkg/vegan/man/add1.cca.Rd
===================================================================
--- pkg/vegan/man/add1.cca.Rd	2013-12-03 17:34:58 UTC (rev 2801)
+++ pkg/vegan/man/add1.cca.Rd	2013-12-03 18:37:39 UTC (rev 2802)
@@ -22,7 +22,7 @@
   \item{test}{ Should a permutation test be added using \code{\link{anova.cca}}. }
  
  \item{permutations}{Permutation scheme as defined in
-   \code{\link[permute]{ho}}; the default defines a simple
+   \code{\link[permute]{how}}; the default defines a simple
    permutations (and could also be expressed as a single number). Any
    structure accepted by \code{\link{anova.cca}} acn be used.}
 

Modified: pkg/vegan/man/anova.cca.Rd
===================================================================
--- pkg/vegan/man/anova.cca.Rd	2013-12-03 17:34:58 UTC (rev 2801)
+++ pkg/vegan/man/anova.cca.Rd	2013-12-03 18:37:39 UTC (rev 2802)
@@ -73,6 +73,8 @@
     used to select the marginal terms for testing. The default is to
     test all marginal terms in \code{\link{drop.scope}}.}
 
+  \item{first}{Analyse only significance of the first axis.}
+
   \item{\dots}{Parameters passed to other functions.  \code{anova.cca}
     passes all arguments to \code{permutest.cca}. In \code{anova} with
     \code{by = "axis"} you can use argument \code{cutoff} (defaults

Modified: pkg/vegan/man/ordistep.Rd
===================================================================
--- pkg/vegan/man/ordistep.Rd	2013-12-03 17:34:58 UTC (rev 2801)
+++ pkg/vegan/man/ordistep.Rd	2013-12-03 18:37:39 UTC (rev 2802)
@@ -16,10 +16,10 @@
 }
 \usage{
 ordistep(object, scope, direction = c("both", "backward", "forward"),
-   Pin = 0.05, Pout = 0.1, pstep = 100, perm.max = 1000, steps = 50,
+   Pin = 0.05, Pout = 0.1, permutation = how(nperm = 199), steps = 50,
    trace = TRUE, ...)
 ordiR2step(object, scope, direction = c("both", "forward"),
-   Pin = 0.05, R2scope = TRUE, pstep = 100, perm.max = 1000,
+   Pin = 0.05, R2scope = TRUE, permutations = how(nperm = 499),
    trace = TRUE, ...)
 }
 %- maybe also 'usage' for other objects documented here.



More information about the Vegan-commits mailing list