vec: Vectorize a matrix

View source: R/vec.R

vecR Documentation

Vectorize a matrix

Description

This function returns a column vector that is a stack of the columns of x, an m by n matrix.

Usage

vec(x)

Arguments

x

a matrix

Value

A matrix with m\;n rows and one column.

Author(s)

Frederick Novomestky fnovomes@poly.edu

References

Magnus, J. R. and H. Neudecker (1999) Matrix Differential Calculus with Applications in Statistics and Econometrics, Second Edition, John Wiley.

Examples

x <- matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE )
print( x )
vecx <- vec( x )
print( vecx )

matrixcalc documentation built on Sept. 15, 2022, 1:05 a.m.

Related to vec in matrixcalc...