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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 12 22:09:27 CEST 2009


Author: jarioksa
Date: 2009-08-12 22:09:27 +0200 (Wed, 12 Aug 2009)
New Revision: 921

Modified:
   pkg/vegan/R/estaccum.R
Log:
fixing careless slackness in estaccumR

Modified: pkg/vegan/R/estaccum.R
===================================================================
--- pkg/vegan/R/estaccum.R	2009-08-12 17:43:45 UTC (rev 920)
+++ pkg/vegan/R/estaccum.R	2009-08-12 20:09:27 UTC (rev 921)
@@ -8,7 +8,7 @@
     S <- chao <- ace <- matrix(0, nrow = n, ncol = permutations)
     for (i in 1:permutations) {
         take <- sample(n)
-        tmp <- estimateR(apply(x, 2, cumsum))
+        tmp <- estimateR(apply(x[take,], 2, cumsum))
         S[,i] <- tmp[1,]
         chao[,i] <- tmp[2,]
         ace[, i] <- tmp[4,]
@@ -16,6 +16,6 @@
     means <- cbind(N = N, S = rowMeans(S), Chao = rowMeans(chao),
                    ACE = rowMeans(ace))
     out <- list(S = S, chao = chao, ace = ace, N = N, means = means)
-    class(out) <- c("accumR", "poolaccum")
+    class(out) <- c("estaccumR", "poolaccum")
     out
 }



More information about the Vegan-commits mailing list