[Vegan-commits] r1606 - in pkg/vegan: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 26 15:25:08 CEST 2011


Author: jarioksa
Date: 2011-05-26 15:25:08 +0200 (Thu, 26 May 2011)
New Revision: 1606

Modified:
   pkg/vegan/R/specaccum.R
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/specaccum.Rd
Log:
revert r1505,7: no more weighted specaccum

Modified: pkg/vegan/R/specaccum.R
===================================================================
--- pkg/vegan/R/specaccum.R	2011-05-26 13:14:10 UTC (rev 1605)
+++ pkg/vegan/R/specaccum.R	2011-05-26 13:25:08 UTC (rev 1606)
@@ -1,9 +1,7 @@
 `specaccum` <-
     function (comm, method = "exact", permutations = 100, conditioned=TRUE,
-              gamma="jack1", w = NULL, ...)
+              gamma="jack1", ...)
 {
-    if (!is.null(w) && !(method %in% c("random", "collector")))
-        stop(gettextf("weights 'w' can be only used with methods 'random' and 'collector'"))
     x <- comm
     x <- as.matrix(x)
     x <- x[, colSums(x) > 0, drop=FALSE]
@@ -24,16 +22,11 @@
         message("No actual accumulation since only 1 site provided")
     switch(method, collector = {
         sites <- 1:n
-        weights <- cumsum(w)
         specaccum <- accumulator(x, sites)
     }, random = {
         perm <- array(dim = c(n, permutations))
-        if (!is.null(w))
-            weights <- array(dim = c(n, permutations))
         for (i in 1:permutations) {
-            perm[, i] <- accumulator(x, ord <- sample(n))
-            if(!is.null(w))
-                weights[,i] <- cumsum(w[ord])
+            perm[, i] <- accumulator(x, sample(n))
         }
         sites <- 1:n
         specaccum <- apply(perm, 1, mean)
@@ -94,8 +87,6 @@
     })
     out <- list(call = match.call(), method = method, sites = sites,
                 richness = specaccum, sd = sdaccum, perm = perm)
-    if (!is.null(weights))
-        out$weights <- weights
     if (method == "rarefaction")
         out$individuals <- ind
     class(out) <- "specaccum"

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2011-05-26 13:14:10 UTC (rev 1605)
+++ pkg/vegan/inst/ChangeLog	2011-05-26 13:25:08 UTC (rev 1606)
@@ -10,6 +10,13 @@
 	in their Raup-Crick index. This is against established practice in
 	order statistics and therefore we cancelled this.
 
+	* specaccum: reverted r1505 & 1507, or introduction of weighted
+	species accumulation model in version 1.18-23. The method was
+	introduced because of user request, but these persons lost their
+	interest and therefore there is no reason to see the trouble that
+	finalizing these functions would require (see comments on version
+	1.18-23 about some of the work needed, and there is more).
+
 Version 1.18-30 (closed May 26, 2011)
 
 	* opened with the release of vegan 1.17-10 on April 27, 2011.

Modified: pkg/vegan/man/specaccum.Rd
===================================================================
--- pkg/vegan/man/specaccum.Rd	2011-05-26 13:14:10 UTC (rev 1605)
+++ pkg/vegan/man/specaccum.Rd	2011-05-26 13:25:08 UTC (rev 1606)
@@ -15,7 +15,7 @@
 }
 \usage{
 specaccum(comm, method = "exact", permutations = 100,
-          conditioned =TRUE, gamma = "jack1",  w = NULL, ...)
+          conditioned =TRUE, gamma = "jack1",  ...)
 \method{plot}{specaccum}(x, add = FALSE, ci = 2, ci.type = c("bar", "line", "polygon"), 
     col = par("fg"), ci.col = col, ci.lty = 1, xlab, 
     ylab = x$method, ylim, xvar = c("sites", "individuals"), ...)
@@ -63,7 +63,6 @@
   \item{object}{Either a community data set or fitted \code{specaccum} model.}
   \item{model}{Nonlinear regression model (\code{\link{nls}}). See Details.}
   \item{lty}{line type code (see \code{\link{par}}.}
-  \item{w}{Not yet documented.}
   \item{...}{Other parameters to functions.}
 }
 \details{



More information about the Vegan-commits mailing list