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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 21 21:27:30 CEST 2011


Author: psolymos
Date: 2011-09-21 21:27:18 +0200 (Wed, 21 Sep 2011)
New Revision: 1868

Modified:
   pkg/vegan/R/simulate.nullmodel.R
   pkg/vegan/R/update.nullmodel.R
Log:
proper arg type (integer) for nsim and thin enforced

Modified: pkg/vegan/R/simulate.nullmodel.R
===================================================================
--- pkg/vegan/R/simulate.nullmodel.R	2011-09-21 16:27:34 UTC (rev 1867)
+++ pkg/vegan/R/simulate.nullmodel.R	2011-09-21 19:27:18 UTC (rev 1868)
@@ -29,7 +29,7 @@
         burnin <- 0L
     }
     perm <- object$commsim$fun(x=x,
-        n=nsim,
+        n=as.integer(nsim),
         nr=object$nrow,
         nc=object$ncol,
         rs=object$rowSums,
@@ -38,7 +38,7 @@
         cf=object$colFreq,
         s=object$totalSum,
         fill=object$fill,
-        thin=thin, ...)
+        thin=as.integer(thin), ...)
     if (object$commsim$isSeq) {
         Start <- as.integer(object$iter + 1L)
         End <- as.integer(object$iter + nsim * thin)

Modified: pkg/vegan/R/update.nullmodel.R
===================================================================
--- pkg/vegan/R/update.nullmodel.R	2011-09-21 16:27:34 UTC (rev 1867)
+++ pkg/vegan/R/update.nullmodel.R	2011-09-21 19:27:18 UTC (rev 1868)
@@ -13,7 +13,7 @@
     }
     if (object$commsim$isSeq) {
         perm <- object$commsim$fun(x=object$state,
-            n=1,
+            n=1L,
             nr=object$nrow,
             nc=object$ncol,
             rs=object$rowSums,
@@ -22,7 +22,7 @@
             cf=object$colFreq,
             s=object$totalSum,
             fill=object$fill,
-            thin=nsim, ...)
+            thin=as.integer(nsim), ...)
         state <- perm[,,1L]
         storage.mode(state) <- object$commsim$mode
         iter <- as.integer(object$iter + nsim)



More information about the Vegan-commits mailing list