ts_data {daltoolbox}R 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)

[Package daltoolbox version 1.0.767 Index]