[Vegan-commits] r2634 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 14 13:24:10 CEST 2013
Author: jarioksa
Date: 2013-10-14 13:24:09 +0200 (Mon, 14 Oct 2013)
New Revision: 2634
Modified:
pkg/vegan/R/permutest.cca.R
Log:
return something sensible with insensible input of no constraints
Modified: pkg/vegan/R/permutest.cca.R
===================================================================
--- pkg/vegan/R/permutest.cca.R 2013-10-14 07:40:57 UTC (rev 2633)
+++ pkg/vegan/R/permutest.cca.R 2013-10-14 11:24:09 UTC (rev 2634)
@@ -9,6 +9,16 @@
model = c("reduced", "direct", "full"), first = FALSE,
strata = NULL, parallel = getOption("mc.cores") , ...)
{
+ ## do something sensible with insensible input (no constraints)
+ if (is.null(x$CCA)) {
+ sol <- list(call = match.call(), testcall = x$call, model = NA,
+ F.0 = NA, F.perm = NA, chi = c(0, x$CA$tot.chi),
+ num = 0, den = 0, df = c(0, nrow(x$CA$u) - 1),
+ nperm = 0, method = x$method, first = FALSE,
+ Random.seed = NA)
+ class(sol) <- "permutest.cca"
+ return(sol)
+ }
model <- match.arg(model)
isCCA <- !inherits(x, "rda")
isPartial <- !is.null(x$pCCA)
More information about the Vegan-commits
mailing list