Learn R Programming

spate (version 1.7.5)

vect.to.TSmat: Converts a stacked vector into matrix.

Description

Converts a stacked N*T vector into a time-space matrix with columns and rows corresponding to time and space, respectively.

Usage

vect.to.TSmat(vect, T = 1)

Value

A T x N matrix with columns and rows corresponding to time and space, respectively.

Arguments

vect

A vector of stacked values. Stacking is done first over space and then time.

T

Number of time points.

Author

Fabio Sigrist

Examples

Run this code
vect <- 1:12
vect
vect.to.TSmat(vect,T=3)

Run the code above in your browser using DataLab