Learn R Programming

dtwclust (version 6.0.0)

tslist: Coerce matrices or data frames to a list of time series

Description

Change a matrix or data frame to a list of univariate time series

Usage

tslist(series, simplify = FALSE)

Value

A list of time series.

Arguments

series

A matrix or data frame where each row is a time series.

simplify

Coerce all series in the resulting list to either matrix (multivariate) or numeric (univariate).

Details

Almost all functions in dtwclust work internally with lists of time series. If you want to avoid constant coercion, create a list of time series once by calling this function.

For matrices and data frames, each row is considered as one time series. A list input is simply passed through.