[Vegan-commits] r917 - in pkg/vegan: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Aug 12 18:00:20 CEST 2009
Author: jarioksa
Date: 2009-08-12 18:00:20 +0200 (Wed, 12 Aug 2009)
New Revision: 917
Added:
pkg/vegan/R/plot.poolaccum.R
Modified:
pkg/vegan/inst/ChangeLog
pkg/vegan/man/specpool.Rd
Log:
poolaccum: plot methods and more docuentation
Added: pkg/vegan/R/plot.poolaccum.R
===================================================================
--- pkg/vegan/R/plot.poolaccum.R (rev 0)
+++ pkg/vegan/R/plot.poolaccum.R 2009-08-12 16:00:20 UTC (rev 917)
@@ -0,0 +1,14 @@
+`plot.poolaccum` <-
+ function(x, alpha = 0.05, type = c("l","g"), ...)
+{
+ require(lattice) || stop("Needs package 'lattice'")
+ m <- summary(x, alpha = alpha, ...)
+ n <- nrow(m[[1]])
+ Size <- as.vector(sapply(m, function(x) c(x[,1], x[,1], rev(x[,1]))))
+ Richness <- as.vector(sapply(m, function(x) c(x[,2], x[,3], rev(x[,4]))) )
+ indnames <- as.character(sapply(m, function(x) colnames(x[,2, drop=FALSE])))
+ Index <- factor(rep(indnames, each = 3 * n), levels = indnames)
+ lintype <- rep(c(rep("aver", n), rep("envel", 2*n)), length=length(Size))
+ xyplot(Richness ~ Size | Index, as.table = TRUE, groups = lintype,
+ type = type, ...)
+}
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2009-08-12 09:10:52 UTC (rev 916)
+++ pkg/vegan/inst/ChangeLog 2009-08-12 16:00:20 UTC (rev 917)
@@ -5,7 +5,9 @@
Version 1.16-23 (opened August 11, 2009)
* poolaccum: new function to find the extrapolated richness
- values (or specpool() estimates) for random accumulation of sites.
+ values (or specpool() estimates) for random accumulation of
+ sites (with summary and plot methods). Arguments (indices) still
+ need consistent naming.
Version 1.16-22 (closed August 11, 2009)
Modified: pkg/vegan/man/specpool.Rd
===================================================================
--- pkg/vegan/man/specpool.Rd 2009-08-12 09:10:52 UTC (rev 916)
+++ pkg/vegan/man/specpool.Rd 2009-08-12 16:00:20 UTC (rev 917)
@@ -4,6 +4,7 @@
\alias{poolaccum}
\alias{print.poolaccum}
\alias{summary.poolaccum}
+\alias{plot.poolaccum}
\alias{estimateR}
\alias{estimateR.default}
\alias{estimateR.matrix}
@@ -18,19 +19,26 @@
}
\usage{
specpool(x, pool)
+estimateR(x, ...)
specpool2vect(X, index = c("Jack.1","Jack.2", "Chao", "Boot","Species"))
poolaccum(x, permutations = 100, minsize = 3)
-estimateR(x, ...)
+\method{summary}{poolaccum}(object, display, alpha = 0.05, ...)
+\method{plot}{poolaccum}(x, alpha = 0.05, type = c("l","g"), ...)
}
\arguments{
- \item{x}{Data frame or matrix with species data.}
+ \item{x}{Data frame or matrix with species data or the analysis result
+ for \code{plot} function.}
\item{pool}{A vector giving a classification for pooling the sites in
the species data. If missing, all sites are pooled together.}
- \item{X}{A \code{specpool} result object.}
+ \item{X, object}{A \code{specpool} result object.}
\item{index}{The selected index of extrapolated richness.}
\item{permutations}{Number of permutations of sampling order of sites.}
\item{minsize}{Smallest number of sampling units reported.}
+ \item{display}{Indices to be displayed.}
+ \item{alpha}{Level of quantiles shown. This proportion will be left outside
+ symmetric limits.}
+ \item{type}{Type of graph produced in \code{\link[lattice]{xyplot}}.}
\item{...}{Other parameters (not used).}
}
\details{
@@ -67,6 +75,13 @@
Function \code{poolaccum} is similar to \code{\link{specaccum}}, but
it estimates all extrapolated richness values of \code{specpool} in
addition to number of species for random ordering of sampling units.
+ The function has \code{summary} and \code{plot} methods. The
+ \code{summary} returns quantile envilopes of permutations
+ corresponding the given level of \code{alpha} and standard deviation
+ of permutations for each sample size. The \code{plot} function shows
+ the mean and envelope of permutations with given \code{alpha} for
+ models. The selection of models can be restricted and order changes
+ using the \code{display} argument in \code{summary} or \code{plot}.
The abundance-based estimates in \code{estimateR} use counts (frequencies) of
species in a single site. If called for a matrix or data frame, the
@@ -166,6 +181,11 @@
border="cyan3", notch=TRUE)
par(op)
data(BCI)
+## Accumulation model
+pool <- poolaccum(BCI)
+summary(pool, display = "chao")
+plot(pool)
+## Quantitative model
estimateR(BCI[1:5,])
}
\keyword{ univar }
More information about the Vegan-commits
mailing list