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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 12 22:13:01 CEST 2011


Author: psolymos
Date: 2011-09-12 22:13:01 +0200 (Mon, 12 Sep 2011)
New Revision: 1842

Modified:
   pkg/vegan/R/permatfull.R
   pkg/vegan/R/permatswap.R
Log:
permat* stores and passes $orig as.matrix

Modified: pkg/vegan/R/permatfull.R
===================================================================
--- pkg/vegan/R/permatfull.R	2011-09-12 20:09:33 UTC (rev 1841)
+++ pkg/vegan/R/permatfull.R	2011-09-12 20:13:01 UTC (rev 1842)
@@ -5,6 +5,7 @@
     mtype <- match.arg(mtype, c("prab", "count"))
     shuffle <- match.arg(shuffle, c("ind", "samp", "both"))
     fixedmar <- match.arg(fixedmar, c("none", "rows", "columns", "both"))
+    m <- as.matrix(m)
 
     if (is.null(strata))
         str <- as.factor(rep(1, nrow(m)))

Modified: pkg/vegan/R/permatswap.R
===================================================================
--- pkg/vegan/R/permatswap.R	2011-09-12 20:09:33 UTC (rev 1841)
+++ pkg/vegan/R/permatswap.R	2011-09-12 20:13:01 UTC (rev 1842)
@@ -7,6 +7,8 @@
     fixedmar <- match.arg(fixedmar, c("rows", "columns", "both"))
     shuffle <- match.arg(shuffle, c("samp", "both"))
     count <- mtype == "count"
+    m <- as.matrix(m)
+
     ## evaluating algo type
     if (count) {
         method <- match.arg(method, c("swap", "quasiswap", "swsh", "abuswap"))



More information about the Vegan-commits mailing list