my_forecast <- Forecast(
origin = c("2010-03-31", "2010-06-30", "2010-09-30", "2010-12-31"),
future = c("2011-03-31", "2011-06-30", "2011-09-30", "2011-12-31"),
forecast = c(4.21, 4.27, 5.32, 5.11),
realized = c(4.40, 4.45, 4.87, 4.77),
h_ahead = 4L
)
origin(my_forecast) <- c("2010-04-01", "2010-07-01", "2010-10-01", "2011-01-01")
future(my_forecast) <- c("2012-04-01", "2012-07-01", "2012-10-01", "2013-01-01")
forc(my_forecast) <- c(8.87, 7.61, 7.56, 5.96)
realized(my_forecast) <- c(6.64, 6.10, 6.33, 6.67)
h_ahead(my_forecast) <- 8L
origin(my_forecast)
future(my_forecast)
forc(my_forecast)
realized(my_forecast)
h_ahead(my_forecast)
Run the code above in your browser using DataLab