[Vegan-commits] r1951 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 17 18:51:48 CEST 2011
Author: jarioksa
Date: 2011-10-17 18:51:48 +0200 (Mon, 17 Oct 2011)
New Revision: 1951
Modified:
pkg/vegan/R/envfit.default.R
pkg/vegan/R/envfit.formula.R
Log:
envfit.default did not pass permutation matrix to its worker functions
(detected because vegan-Ex.Rout changed in R CMD check)
Modified: pkg/vegan/R/envfit.default.R
===================================================================
--- pkg/vegan/R/envfit.default.R 2011-10-16 17:34:49 UTC (rev 1950)
+++ pkg/vegan/R/envfit.default.R 2011-10-17 16:51:48 UTC (rev 1951)
@@ -21,7 +21,7 @@
if (length(permutations) == 1) {
if (permutations > 0 ) {
arg <- if (missing(strata)) NULL else strata
- permat <- t(replicate(permutations,
+ permutations <- t(replicate(permutations,
permuted.index(nr, strata=arg)))
}
} else {
@@ -29,7 +29,6 @@
if (ncol(permat) != nr)
stop(gettextf("'permutations' have %d columns, but data have %d rows",
ncol(permat), nr))
- permutations <- nrow(permutations)
}
if (is.data.frame(env)) {
facts <- sapply(env, is.factor)
Modified: pkg/vegan/R/envfit.formula.R
===================================================================
--- pkg/vegan/R/envfit.formula.R 2011-10-16 17:34:49 UTC (rev 1950)
+++ pkg/vegan/R/envfit.formula.R 2011-10-17 16:51:48 UTC (rev 1951)
@@ -7,5 +7,5 @@
X <- eval(X, data, parent.frame())
formula[[2]] <- NULL
P <- model.frame(formula, data, na.action = na.pass)
- envfit(X, P, ...)
+ envfit.default(X, P, ...)
}
More information about the Vegan-commits
mailing list