File: as.ts.oecosimu.R

package info (click to toggle)
r-cran-vegan 2.5-7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,564 kB
  • sloc: ansic: 2,275; fortran: 1,088; sh: 42; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 562 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
`as.ts.oecosimu` <-
    function(x, ...)
{
    if  (!x$oecosimu$isSeq)
        stop("as.ts available only for sequential methods")
    chains <- attr(x$oecosimu$simulated, "chains")
    if (!is.null(chains) && chains > 1)
        stop("as.ts available only for single chain")
    thin <- attr(x$oecosimu$simulated, "thin")
    startval <- attr(x$oecosimu$simulated, "burnin") + thin
    out <- ts(t(x$oecosimu$simulated), start = startval, deltat=thin,
        names = names(x$oecosimu$z))
    attr(out, "burnin") <- NULL
    attr(out, "thin") <- NULL
    out
}