ts2mat: Reshape a vector into a matrix

Description Usage Arguments Value Examples

View source: R/ts2mat.R

Description

This function reshapes a vector into a matrix whose row elements are taken from the vector. Orders of elements keep unchanged from the vector.

Usage

1
ts2mat(x, w)

Arguments

x

a vector or a time series

w

a number specifying number of columns of the matrix

Value

a matrix

Examples

1
2
3
x=ts2mat(c(1:(128*20)),128)
dim(x)
x[1,1:20]

TED documentation built on May 2, 2019, 4:26 a.m.

Related to ts2mat in TED...