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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 22 13:56:56 CEST 2011


Author: jarioksa
Date: 2011-09-22 13:56:56 +0200 (Thu, 22 Sep 2011)
New Revision: 1870

Modified:
   pkg/vegan/R/nullmodel.R
Log:
storage.mode must of counts must be integer or C routines may fail (swap_count)

Modified: pkg/vegan/R/nullmodel.R
===================================================================
--- pkg/vegan/R/nullmodel.R	2011-09-22 10:26:09 UTC (rev 1869)
+++ pkg/vegan/R/nullmodel.R	2011-09-22 11:56:56 UTC (rev 1870)
@@ -19,6 +19,8 @@
     int <- method$mode == "integer"
     if (int && abs(sum(x) - sum(as.integer(x))) > 10^-6)
         stop("non integer values not allowed")
+    if (int)
+        storage.mode(x) <- "integer"
     out <- list(
         data=x,
         nrow=as.integer(dim(x)[1L]),



More information about the Vegan-commits mailing list