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

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 May 29, 2024, 1:57 a.m.