Learn R Programming

utsf (version 1.3.0)

autoplot.utsf_forecast: Create a ggplot object from an utsf_forecast object

Description

Plot the time series and its associated forecast.

Usage

# S3 method for utsf_forecast
autoplot(object, ...)

Value

The ggplot object representing a plotting of the time series and its forecast.

Arguments

object

An object of class utsf_forecast.

...

additional parameter.

Examples

Run this code
m <- create_model(AirPassengers, lags = 1:12, method = "rf")
f <- forecast(m, h = 12)
library(ggplot2)
autoplot(f)

Run the code above in your browser using DataLab