# add 5 predictions to data then plot it
data.frame(
time = seq_len(53),
lh = c(
as.vector(lh),
as.vector(predict(arima(lh, order = c(1,0,1)), 5)$pred)
)
) %>%
apex(aes(time, lh), type = "line") %>%
ax_xaxis(type = "numeric") %>%
ax_forecast_data_points(count = 5)
Run the code above in your browser using DataLab