ts_data: ts_data

View source: R/ts_data.R

ts_dataR Documentation

ts_data

Description

Time series data structure used in DAL Toolbox. It receives a vector (representing a time series) or a matrix y (representing a sliding windows). Internal ts_data is matrix of sliding windows with size sw. If sw equals to zero, it store a time series as a single matrix column.

Usage

ts_data(y, sw = 1)

Arguments

y

output variable

sw

integer: sliding window size.

Value

returns a ts_data object.

Examples

data(sin_data)
head(sin_data)

data <- ts_data(sin_data$y)
ts_head(data)

data10 <- ts_data(sin_data$y, 10)
ts_head(data10)

daltoolbox documentation built on Nov. 3, 2024, 9:06 a.m.