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(tsd)
head(tsd)

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

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

tspredit documentation built on June 22, 2025, 5:07 p.m.