Learn R Programming

ggfortify (version 0.4.17)

rbind_ts: 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"
)

Value

data.frame

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.

Examples

Run this code
if (FALSE) {
predicted <- predict(stats::HoltWinters(UKgas), n.ahead = 5, prediction.interval = TRUE)
rbind_ts(predicted, UKgas, ts.connect = TRUE)
}

Run the code above in your browser using DataLab