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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Aug 12 11:07:51 CEST 2009


Author: jarioksa
Date: 2009-08-12 11:07:50 +0200 (Wed, 12 Aug 2009)
New Revision: 915

Added:
   pkg/vegan/R/summary.poolaccum.R
Modified:
   pkg/vegan/man/specpool.Rd
Log:
poolaccum got summary (not yet documented)

Added: pkg/vegan/R/summary.poolaccum.R
===================================================================
--- pkg/vegan/R/summary.poolaccum.R	                        (rev 0)
+++ pkg/vegan/R/summary.poolaccum.R	2009-08-12 09:07:50 UTC (rev 915)
@@ -0,0 +1,21 @@
+`summary.poolaccum` <-
+    function(object, display, alpha = 0.05, ...)
+{
+    probs <- c(alpha/2, 1-alpha/2)
+    dislabels <- c("S", "chao", "jack1", "jack2", "boot")
+    disnames <- colnames(object$means[,-1])
+    names(disnames) <- dislabels
+    if (missing(display))
+        display <- dislabels
+    else
+        display <- match.arg(display, dislabels, several.ok = TRUE)
+    out <- list()
+    for (item in display) {
+        out[[item]] <- cbind(`N` = object$N,
+                             `Mean` = object$means[,disnames[item], drop=FALSE],
+                             t(apply(object[[item]], 1, quantile, probs=probs)),
+                             `Std.Dev` = apply(object[[item]], 1, sd))
+    }
+    class(out) <- "summary.poolaccum"
+    out
+}

Modified: pkg/vegan/man/specpool.Rd
===================================================================
--- pkg/vegan/man/specpool.Rd	2009-08-11 09:39:04 UTC (rev 914)
+++ pkg/vegan/man/specpool.Rd	2009-08-12 09:07:50 UTC (rev 915)
@@ -3,6 +3,7 @@
 \alias{specpool2vect}
 \alias{poolaccum}
 \alias{print.poolaccum}
+\alias{summary.poolaccum}
 \alias{estimateR}
 \alias{estimateR.default}
 \alias{estimateR.matrix}



More information about the Vegan-commits mailing list