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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 16 07:57:27 CET 2009


Author: jarioksa
Date: 2009-01-16 07:57:27 +0100 (Fri, 16 Jan 2009)
New Revision: 664

Modified:
   pkg/vegan/R/adonis.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/adonis.Rd
Log:
adonis: gained terms component, design.matrix renames to model.matrix (and documented)

Modified: pkg/vegan/R/adonis.R
===================================================================
--- pkg/vegan/R/adonis.R	2009-01-16 06:38:44 UTC (rev 663)
+++ pkg/vegan/R/adonis.R	2009-01-16 06:57:27 UTC (rev 664)
@@ -13,6 +13,7 @@
         permutations <- permutations - 1
         warning("Setting no. of permutations to ", permutations)
     }
+    Terms <- terms(formula, data = data)
     lhs <- formula[[2]]
     lhs <- eval(lhs, data, parent.frame()) # to force evaluation 
     formula[[2]] <- NULL                # to remove the lhs
@@ -103,7 +104,7 @@
     colnames(tab)[ncol(tab)] <- "Pr(>F)"
     out <- list(aov.tab = tab, call = match.call(), 
                 coefficients = beta.spp, coef.sites = beta.sites,
-                f.perms = f.perms, design.matrix = rhs)
+                f.perms = f.perms, model.matrix = rhs, terms = Terms)
     class(out) <- "adonis"
     out
 }

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2009-01-16 06:38:44 UTC (rev 663)
+++ pkg/vegan/inst/ChangeLog	2009-01-16 06:57:27 UTC (rev 664)
@@ -11,7 +11,9 @@
 
 	* adonis: uses now canonical (hits+1)/(tries+1) for P-values
 	instead of hits/tries. Default number of permutations increased
-	from 5 to 999.
+	from 5 to 999. Added terms component so that things like update()
+	and drop.scope() magically started to work. Renamed design.matrix
+	into model.matrix (and documented the item). 
 
 	* permatswap: new algorithm "swsh" is added to keep row/column
 	incidences (but not sums) constant. The name refers to the two

Modified: pkg/vegan/man/adonis.Rd
===================================================================
--- pkg/vegan/man/adonis.Rd	2009-01-16 06:38:44 UTC (rev 663)
+++ pkg/vegan/man/adonis.Rd	2009-01-16 06:57:27 UTC (rev 664)
@@ -123,6 +123,9 @@
   \item{f.perms}{ an \eqn{N} by \eqn{m} matrix of the null \eqn{F}
     statistics for each source of variation  based on \eqn{N}
     permutations of the data.}
+  \item{model.matrix}{The \code{\link{model.matrix}} for the right hand
+    side of the formula.}
+  \item{terms}{The \code{\link{terms}} component of the model.}
 }
 \references{
 Anderson, M.J. 2001. A new method for non-parametric multivariate



More information about the Vegan-commits mailing list