[Vegan-commits] r1900 - pkg/vegan/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Sep 27 09:30:37 CEST 2011
Author: jarioksa
Date: 2011-09-27 09:30:37 +0200 (Tue, 27 Sep 2011)
New Revision: 1900
Modified:
pkg/vegan/R/as.ts.oecosimu.R
pkg/vegan/R/oecosimu.R
Log:
as.ts() works with new oecosimu()
Modified: pkg/vegan/R/as.ts.oecosimu.R
===================================================================
--- pkg/vegan/R/as.ts.oecosimu.R 2011-09-27 01:18:22 UTC (rev 1899)
+++ pkg/vegan/R/as.ts.oecosimu.R 2011-09-27 07:30:37 UTC (rev 1900)
@@ -1,10 +1,8 @@
`as.ts.oecosimu` <-
function(x, ...)
{
- seqmethods <- c("swap", "tswap", "permat.swap", "permat.abuswap")
- if (!(x$oecosimu$method %in% seqmethods))
- stop("as.ts available only for sequential methods ",
- paste(seqmethods, collapse=", "))
+ if (!x$oecosimu$isSeq)
+ stop("as.ts available only for sequential methods")
startval <- attr(x$oecosimu$simulated, "burnin") + 1
thin <- attr(x$oecosimu$simulated, "thin")
out <- ts(t(x$oecosimu$simulated), start = startval, deltat=thin,
Modified: pkg/vegan/R/oecosimu.R
===================================================================
--- pkg/vegan/R/oecosimu.R 2011-09-27 01:18:22 UTC (rev 1899)
+++ pkg/vegan/R/oecosimu.R 2011-09-27 07:30:37 UTC (rev 1900)
@@ -88,7 +88,8 @@
if (!is.list(ind))
ind <- list(statistic = ind)
ind$oecosimu <- list(z = z, pval = p, simulated=simind, method=method,
- statistic = indstat, alternative = alternative)
+ statistic = indstat, alternative = alternative,
+ isSeq = attr(x, "isSeq"))
class(ind) <- c("oecosimu", class(ind))
ind
}
More information about the Vegan-commits
mailing list