[Vegan-commits] r731 - in pkg/vegan: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Mar 8 16:54:41 CET 2009
Author: jarioksa
Date: 2009-03-08 16:54:41 +0100 (Sun, 08 Mar 2009)
New Revision: 731
Added:
pkg/vegan/R/as.mcmc.oecosimu.R
Modified:
pkg/vegan/inst/ChangeLog
pkg/vegan/man/oecosimu.Rd
Log:
as.mcmc.oecosimu: translates sequential oecosimu results to mcmc object of the coda package for further analysis of the sequences
Added: pkg/vegan/R/as.mcmc.oecosimu.R
===================================================================
--- pkg/vegan/R/as.mcmc.oecosimu.R (rev 0)
+++ pkg/vegan/R/as.mcmc.oecosimu.R 2009-03-08 15:54:41 UTC (rev 731)
@@ -0,0 +1,10 @@
+`as.mcmc.oecosimu` <-
+ function(x)
+{
+ x <- as.ts(out)
+ mcpar <- attr(x, "tsp")
+ mcpar[3] <- round(1/mcpar[3])
+ attr(x, "mcpar") <- mcpar
+ class(x) <- "mcmc"
+ x
+}
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2009-03-08 07:21:28 UTC (rev 730)
+++ pkg/vegan/inst/ChangeLog 2009-03-08 15:54:41 UTC (rev 731)
@@ -4,6 +4,12 @@
Version 1.16-14 (opened Feb 24, 2009)
+ * as.mcmc.oecosimu: a new function to translate sequential null
+ models to "mcmc" object of the coda package. The coda package
+ provides a wealthy source of the analysis of things like
+ stationarity, adequate sample size, autocorrelation, length of
+ needed burnin-in etc.
+
* density and densityplot: new methods for "oecosimu" objects.
* as.ts.oecosimu: new function for applying time series methods
Modified: pkg/vegan/man/oecosimu.Rd
===================================================================
--- pkg/vegan/man/oecosimu.Rd 2009-03-08 07:21:28 UTC (rev 730)
+++ pkg/vegan/man/oecosimu.Rd 2009-03-08 15:54:41 UTC (rev 731)
@@ -4,6 +4,7 @@
\alias{commsimulator}
\alias{print.oecosimu}
\alias{as.ts.oecosimu}
+\alias{as.mcmc.oecosimu}
\alias{density.oecosimu}
\alias{densityplot.oecosimu}
@@ -22,6 +23,7 @@
statistic = "statistic", control, ...)
commsimulator(x, method, thin=1)
\method{as.ts}{oecosimu}(x, ...)
+\method{as.mcmc}{oecosimu}(x)
\method{density}{oecosimu}(x, ...)
\method{densityplot}{oecosimu}(x, data, xlab = "Simulated", ...)
}
@@ -29,7 +31,8 @@
\arguments{
\item{comm}{Community data.}
\item{x}{Community data for \code{commsimulator}, or an \code{oecosimu}
- result object for \code{as.ts}, \code{density} and \code{densityplot}.}
+ result object for \code{as.ts}, \code{as.mcmc}, \code{density} and
+ \code{densityplot}.}
\item{nestfun}{Function to analyse nestedness. Some functions are
provided in \pkg{vegan}, but any function can be used if it accepts the
community as the first argument, and returns either a plain number or
@@ -139,7 +142,14 @@
Function \code{as.ts} transforms the simulated results of sequential
methods into a time series or a \code{\link{ts}} object. This allows
using analytic tools for time series in studying the sequences (see
- examples). Function \code{density} provides an interface to the
+ examples). Function \code{as.mcmc} transformts teh simulated results
+ of sequential mehots into an \code{\link[coda]{mcmc}} object of the
+ \pkg{coda} package. The \pkg{coda} package provides functions for
+ the analysis of stationarity, adequacy of sample size,
+ autocorrelation, need of burn-in and much more for sequential
+ methods. Please consult the documentation of \pkg{coda} package.
+
+ Function \code{density} provides an interface to the
standard \code{\link{density}} function for the simulated
values. Function \code{\link{densityplot}} is an interface the
\code{\link[lattice]{densityplot}} function of the \pkg{lattice}
More information about the Vegan-commits
mailing list