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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Nov 10 17:06:53 CET 2013


Author: jarioksa
Date: 2013-11-10 17:06:53 +0100 (Sun, 10 Nov 2013)
New Revision: 2697

Modified:
   pkg/vegan/R/anovacca.R
Log:
anovacca should work with a list of objects where the first one is unconstrained

Modified: pkg/vegan/R/anovacca.R
===================================================================
--- pkg/vegan/R/anovacca.R	2013-11-10 15:42:28 UTC (rev 2696)
+++ pkg/vegan/R/anovacca.R	2013-11-10 16:06:53 UTC (rev 2697)
@@ -2,10 +2,6 @@
     function(object, ..., permutations = how(nperm=999), by = NULL,
              strata = NULL) 
 {
-    if (is.null(object$CA) || is.null(object$CCA) ||
-        object$CCA$rank == 0 || object$CA$rank == 0)
-        return(anova.ccanull(object))
-
     if (!exists(".Random.seed", envir = .GlobalEnv,
                 inherits = FALSE)) 
         runif(1)
@@ -26,7 +22,7 @@
     ## now permutations is either a how() structure or a permutation
     ## matrix. Make it to a matrix if it is "how"
     if (inherits(permutations, "how"))
-        permutations <- shuffleSet(nrow(object$CCA$u),
+        permutations <- shuffleSet(nrow(object$CA$u),
                                    control = permutations)
     else # we got a permutation matrix and seed is unknown
         seed <- NA



More information about the Vegan-commits mailing list