[Vegan-commits] r313 - branches/1.11-0/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 10 18:29:13 CEST 2008


Author: gsimpson
Date: 2008-04-10 18:29:12 +0200 (Thu, 10 Apr 2008)
New Revision: 313

Modified:
   branches/1.11-0/R/adonis.R
Log:
Merging fix to adonis (r312) from trunk to 1.11-0 branch

Modified: branches/1.11-0/R/adonis.R
===================================================================
--- branches/1.11-0/R/adonis.R	2008-04-10 16:25:42 UTC (rev 312)
+++ branches/1.11-0/R/adonis.R	2008-04-10 16:29:12 UTC (rev 313)
@@ -10,7 +10,7 @@
     lhs <- formula[[2]]
     lhs <- eval(lhs, data, parent.frame()) # to force evaluation 
     formula[[2]] <- NULL                # to remove the lhs
-    rhs.frame <- model.frame(formula, data) # to get the data frame of rhs
+    rhs.frame <- model.frame(formula, data, drop.unused.levels = TRUE) # to get the data frame of rhs
     op.c <- options()$contrasts
     options( contrasts=c(contr.unordered, contr.ordered) )
     rhs <- model.matrix(formula, rhs.frame) # and finally the model.matrix



More information about the Vegan-commits mailing list