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

View source: R/spateFcts.R

TSmat.to.vectR Documentation

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)

Arguments

mat

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

Value

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

Author(s)

Fabio Sigrist

Examples

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

spate documentation built on Oct. 3, 2023, 5:09 p.m.