R/cum_loss.methods.R

Defines functions print.cum_loss plot.cum_loss

#' @export
plot.cum_loss <- function(cum_loss) {
  p <- ggplot2::ggplot(data = cum_loss$cum_loss, ggplot2::aes(x=date, y=value)) +
    ggplot2::geom_line() +
    ggplot2::facet_wrap(.~variable, scales = "free_y") +
    ggplot2::labs(
      x="Date",
      y="Squared error"
    )
  p
  return(p)
}

#' @export
print.cum_loss <- function(cum_loss) {
  print(cum_loss$cum_loss)
}
pat-alt/SVAA documentation built on Jan. 19, 2024, 7:45 p.m.