[Vegan-commits] r1611 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat May 28 15:32:34 CEST 2011


Author: jarioksa
Date: 2011-05-28 15:32:34 +0200 (Sat, 28 May 2011)
New Revision: 1611

Modified:
   pkg/vegan/R/capscale.R
Log:
found and marked the place where update(capscale_model) fails, but no correction yet

Modified: pkg/vegan/R/capscale.R
===================================================================
--- pkg/vegan/R/capscale.R	2011-05-28 13:22:20 UTC (rev 1610)
+++ pkg/vegan/R/capscale.R	2011-05-28 13:32:34 UTC (rev 1611)
@@ -13,8 +13,11 @@
         data <- ordiGetData(match.call(), environment(formula))
     }
     formula <- formula(terms(formula, data = data))
-    X <- formula[[2]]
-    X <- eval(X, environment(formula))
+    ## the following line fails in update() of a previously fitted
+    ## model because it is eval'ed in environment(formula), but works
+    ## when eval'ed in the default environment -- need to test if the
+    ## environment(formula) is necessary
+    X <- eval(formula[[2]], environment(formula))
     if (!inherits(X, "dist")) {
         comm <- X
         dfun <- match.fun(dfun)



More information about the Vegan-commits mailing list