[Solved] Get access to the elements of a list in R [closed]
as.numeric(res$mean) Will do the job. As per your comment, so Forecast is the actual forecast and it is not always just the mean. Consider the following example using a data set taken from here library(forecast) births <- scan(“http://robjhyndman.com/tsdldata/data/nybirths.dat”) birthstimeseries <- ts(births, frequency=12, start=c(1946,1)) fit <- auto.arima(birthstimeseries) res <- forecast(fit, 12) plot(res) As you can see … Read more