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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 27 19:17:25 CET 2013


Author: jarioksa
Date: 2013-11-27 19:17:25 +0100 (Wed, 27 Nov 2013)
New Revision: 2765

Modified:
   pkg/vegan/R/anosim.R
   pkg/vegan/R/fitspecaccum.R
   pkg/vegan/R/mantel.R
   pkg/vegan/R/mantel.partial.R
Log:
add some dots to really pass arguments to function in [mc]lapply (untested)

Modified: pkg/vegan/R/anosim.R
===================================================================
--- pkg/vegan/R/anosim.R	2013-11-27 17:41:07 UTC (rev 2764)
+++ pkg/vegan/R/anosim.R	2013-11-27 18:17:25 UTC (rev 2765)
@@ -55,7 +55,7 @@
         if(.Platform$OS.type == "unix" && !hasClus) {
             perm <- unlist(mclapply(1:permutations, function(i, ...)
                                     ptest(permat[i,]),
-                                    mc.cores = parallel))
+                                    mc.cores = parallel, ...))
         } else {
             if (!hasClus) {
                 parallel <- makeCluster(parallel)

Modified: pkg/vegan/R/fitspecaccum.R
===================================================================
--- pkg/vegan/R/fitspecaccum.R	2013-11-27 17:41:07 UTC (rev 2764)
+++ pkg/vegan/R/fitspecaccum.R	2013-11-27 18:17:25 UTC (rev 2765)
@@ -32,7 +32,7 @@
                   function(i, ...)
                    NLSFUN(SpeciesRichness[,i],
                           if (hasWeights) object$weights[,i] else x,
-                          model, ...))
+                          model, ...), ...)
     object$fitted <- drop(sapply(mods, fitted))
     object$residuals <- drop(sapply(mods, residuals))
     object$coefficients <- drop(sapply(mods, coef))

Modified: pkg/vegan/R/mantel.R
===================================================================
--- pkg/vegan/R/mantel.R	2013-11-27 17:41:07 UTC (rev 2764)
+++ pkg/vegan/R/mantel.R	2013-11-27 18:17:25 UTC (rev 2765)
@@ -49,7 +49,7 @@
                 perm <- do.call(rbind,
                                mclapply(1:permutations,
                                         function(i, ...) ptest(permat[i,],...),
-                                        mc.cores = parallel))
+                                        mc.cores = parallel, ...))
             } else {
                 if (!hasClus) {
                     parallel <- makeCluster(parallel)

Modified: pkg/vegan/R/mantel.partial.R
===================================================================
--- pkg/vegan/R/mantel.partial.R	2013-11-27 17:41:07 UTC (rev 2764)
+++ pkg/vegan/R/mantel.partial.R	2013-11-27 18:17:25 UTC (rev 2765)
@@ -57,7 +57,7 @@
                 perm <- do.call(rbind,
                                mclapply(1:permutations,
                                         function(i, ...) ptest(permat[i,],...),
-                                        mc.cores = parallel))
+                                        mc.cores = parallel, ...))
             } else {
                 if (!hasClus) {
                     parallel <- makeCluster(parallel)



More information about the Vegan-commits mailing list