fortify.forecast {forecast}R Documentation

Fortify a forecast object to data.frame for ggplot

Description

fortify.forecast takes a forecast object and converts it into a data frame (for usage with ggplot2).

Usage

## S3 method for class 'forecast'
fortify(model, data=as.data.frame(model), PI=TRUE, ...)

Arguments

model

Object of class “ts” to be converted to “data.frame”.

data

Not used (required for fortify method)

PI

If TRUE, confidence intervals are included.

...

Other arguments, currently ignored.

Value

A data.frame containing elements from a forecast object necessary for plotting in ggplot.

Author(s)

Mitchell O'Hara-Wild

See Also

forecast, fortify


[Package forecast version 7.1 Index]