View source: R/ts_projection.R
ts_projection | R Documentation |
Separates a ts_data
object into input and output components for time series analysis.
This function is useful for preparing data for modeling, where the input and output variables are extracted from a time series dataset.
ts_projection(ts)
ts |
matrix or data.frame containing the time series. |
returns a ts_projection
object.
#setting up a ts_data
data(sin_data)
ts <- ts_data(sin_data$y, 10)
io <- ts_projection(ts)
#input data
ts_head(io$input)
#output data
ts_head(io$output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.