rbind_ts: Rbind original and predicted time-series-like instances as...

View source: R/tslib.R

rbind_tsR Documentation

Rbind original and predicted time-series-like instances as fortified data.frame

Description

Rbind original and predicted time-series-like instances as fortified data.frame

Usage

rbind_ts(
  data,
  original,
  ts.connect = TRUE,
  index.name = "Index",
  data.name = "Data"
)

Arguments

data

Predicted/forecasted ts instance

original

Original ts instance

ts.connect

Logical frag indicates whether connects original time-series and predicted values

index.name

Specify column name for time series index

data.name

Specify column name for univariate time series data. Ignored in multivariate time series.

Value

data.frame

Examples

## Not run: 
predicted <- predict(stats::HoltWinters(UKgas), n.ahead = 5, prediction.interval = TRUE)
rbind_ts(predicted, UKgas, ts.connect = TRUE)

## End(Not run)

ggfortify documentation built on May 29, 2024, 7:19 a.m.