R/print_marssPredict.R

Defines functions 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)
}
eeholmes/MARSS documentation built on May 3, 2024, 10:03 p.m.