[Vegan-commits] r2290 - in branches/2.0: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Sep 18 19:27:32 CEST 2012
Author: jarioksa
Date: 2012-09-18 19:27:31 +0200 (Tue, 18 Sep 2012)
New Revision: 2290
Modified:
branches/2.0/R/anova.ccabyaxis.R
branches/2.0/R/anova.ccabyterm.R
branches/2.0/inst/ChangeLog
Log:
merge r2288,9: scoping issues that made anova.ccabyaxis, anova.ccabyterm fail in partial models
Modified: branches/2.0/R/anova.ccabyaxis.R
===================================================================
--- branches/2.0/R/anova.ccabyaxis.R 2012-09-16 15:42:12 UTC (rev 2289)
+++ branches/2.0/R/anova.ccabyaxis.R 2012-09-18 17:27:31 UTC (rev 2290)
@@ -1,8 +1,6 @@
`anova.ccabyaxis` <-
function (object, cutoff = 1, ...)
{
- if(inherits(object, "prc"))
- stop("anova(..., by = 'axis') cannot be used for 'prc' results")
cutoff <- cutoff + sqrt(.Machine$double.eps)
rnk <- object$CCA$rank
if (!max(rnk, 0))
@@ -51,8 +49,10 @@
environment(object$terms) <- environment()
fla <- paste(". ~ ", axnam[1], "+ Condition(",
paste(axnam[-1], collapse="+"),")")
- if (!is.null(CondMat))
+ if (!is.null(CondMat)) {
fla <- paste(fla, " + Condition(CondMat)")
+ lc$CondMat <- CondMat
+ }
fla <- update(formula(object), fla)
sol <- anova(update(object, fla, data=lc), ...)
out[c(1, rnk + 1), ] <- sol
Modified: branches/2.0/R/anova.ccabyterm.R
===================================================================
--- branches/2.0/R/anova.ccabyterm.R 2012-09-16 15:42:12 UTC (rev 2289)
+++ branches/2.0/R/anova.ccabyterm.R 2012-09-18 17:27:31 UTC (rev 2290)
@@ -28,7 +28,7 @@
if (!is.null(object$call$data))
modelframe <- ordiGetData(object$call, globalenv())
else
- modelframe <- NULL
+ modelframe <- model.frame(object)
for (.ITRM in ntrm:2) {
if (ntrm < 2)
break
Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog 2012-09-16 15:42:12 UTC (rev 2289)
+++ branches/2.0/inst/ChangeLog 2012-09-18 17:27:31 UTC (rev 2290)
@@ -4,6 +4,7 @@
Version 2.0-5 (opened June 18, 2012)
+ * merge r2288,9: scoping in anova.ccabyaxis and anova.ccabyterm.
* merge r2262, 2268:2270, and also r1950: mantel and
mantel.partial gained argument na.rm = FALSE. This needed hand
editing of merges, and also merging old r1950: beware and test.
More information about the Vegan-commits
mailing list