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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 17 10:03:28 CET 2011


Author: jarioksa
Date: 2011-01-17 10:03:28 +0100 (Mon, 17 Jan 2011)
New Revision: 1459

Modified:
   pkg/vegan/R/capscale.R
Log:
nobody said it is easy to implement subset in capscale: some more cases covered

Modified: pkg/vegan/R/capscale.R
===================================================================
--- pkg/vegan/R/capscale.R	2011-01-17 08:19:50 UTC (rev 1458)
+++ pkg/vegan/R/capscale.R	2011-01-17 09:03:28 UTC (rev 1459)
@@ -45,7 +45,8 @@
     fla <- update(formula, X ~ .)
     environment(fla) <- environment()
     d <- ordiParseFormula(fla,
-                          if(is.data.frame(data)) cbind(data, comm) else comm,
+                          if(is.data.frame(data) && !is.null(comm)) cbind(data, comm)
+                          else data,
                           envdepth = 1, na.action = na.action,
                           subset = substitute(subset))
     ## ordiParseFormula subsets rows of dissimilarities: do the same



More information about the Vegan-commits mailing list