Learn R Programming

spate (version 1.7.5)

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

Description

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

Usage

TSmat.to.vect(mat)

Value

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

Arguments

mat

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

Author

Fabio Sigrist

Examples

Run this code
vect <- 1:12
mat <- vect.to.TSmat(vect,T=3)##Convert vector to matrix
TSmat.to.vect(mat)##Convert matrix to vector.

Run the code above in your browser using DataLab