R/print_marssPredict.R

Defines functions print.marssPredict

Documented in print.marssPredict

###############################################################################################################################################
#  Print MARSS Forecast
###############################################################################################################################################

print.marssPredict <- function(x, ...) {
  if (x$h == 0) print(x$pred)
  if (x$h != 0) {
    TT <- attr(x$model$model, "model.dims")[["x"]][2]
    loc <- which(colnames(x$pred) == "se")
    print(subset(x$pred, x$t > TT)[, -1 * c(3, loc)])
  }
  invisible(x$pred)
}

Try the MARSS package in your browser

Any scripts or data that you put into this service are public.

MARSS documentation built on May 31, 2023, 9:28 p.m.