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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Dec 3 09:18:25 CET 2015


Author: jarioksa
Date: 2015-12-03 09:18:24 +0100 (Thu, 03 Dec 2015)
New Revision: 2982

Modified:
   pkg/vegan/R/estaccumR.R
   pkg/vegan/R/ordiareatest.R
   pkg/vegan/R/renyiaccum.R
   pkg/vegan/R/tsallisaccum.R
Log:
Merge branch 'cran-2.3' into r-forge-svn-local

Modified: pkg/vegan/R/estaccumR.R
===================================================================
--- pkg/vegan/R/estaccumR.R	2015-11-30 07:46:30 UTC (rev 2981)
+++ pkg/vegan/R/estaccumR.R	2015-12-03 08:18:24 UTC (rev 2982)
@@ -28,7 +28,7 @@
                 stopCluster(parallel)
         }
     } else {
-        tmp <- lapply(1:permutations, function(i) estFun(permat[i,]))
+        tmp <- lapply(1:nperm, function(i) estFun(permat[i,]))
     }
 
     S <- sapply(tmp, function(x) x[1,])

Modified: pkg/vegan/R/ordiareatest.R
===================================================================
--- pkg/vegan/R/ordiareatest.R	2015-11-30 07:46:30 UTC (rev 2981)
+++ pkg/vegan/R/ordiareatest.R	2015-12-03 08:18:24 UTC (rev 2982)
@@ -34,7 +34,7 @@
     if (hasClus || parallel > 1) {
         if(.Platform$OS.type == "unix" && !hasClus) {
             areas <- do.call(cbind,
-                             mclapply(1:permutations,
+                             mclapply(1:nperm,
                                       function(i, ...) pfun(perm[i,],...),
                                         mc.cores = parallel))
             } else {
@@ -46,7 +46,7 @@
                     stopCluster(parallel)
             }
     } else {
-        areas <- sapply(1:permutations, function(i, ...) pfun(perm[i,], ...))
+        areas <- sapply(1:nperm, function(i, ...) pfun(perm[i,], ...))
     }
     signif <- (rowSums(areas <= obs + EPS) + 1)/(nperm + 1)
     out <- list("areas" = obs, "pvalues" = signif, "permutations" = areas,

Modified: pkg/vegan/R/renyiaccum.R
===================================================================
--- pkg/vegan/R/renyiaccum.R	2015-11-30 07:46:30 UTC (rev 2981)
+++ pkg/vegan/R/renyiaccum.R	2015-12-03 08:18:24 UTC (rev 2982)
@@ -13,6 +13,7 @@
         p <- ncol(x)
     }
     pmat <- getPermuteMatrix(permutations, n)
+    permutations <- nrow(pmat)
     m <- length(scales)
     result <- array(dim=c(n,m,permutations))
     dimnames(result) <- list(pooled.sites=c(1:n), scale=scales,

Modified: pkg/vegan/R/tsallisaccum.R
===================================================================
--- pkg/vegan/R/tsallisaccum.R	2015-11-30 07:46:30 UTC (rev 2981)
+++ pkg/vegan/R/tsallisaccum.R	2015-12-03 08:18:24 UTC (rev 2982)
@@ -13,6 +13,7 @@
         p <- ncol(x)
     }
     pmat <- getPermuteMatrix(permutations, n)
+    permutations <- nrow(pmat)
     m <- length(scales)
     result <- array(dim = c(n, m, permutations))
     dimnames(result) <- list(pooled.sites = c(1:n), scale = scales, 



More information about the Vegan-commits mailing list