vec | R Documentation |
This function returns a column vector that is a stack of the columns of x, an m by n matrix.
vec(x)
x |
a matrix |
A matrix with m\;n rows and one column.
Frederick Novomestky fnovomes@poly.edu
Magnus, J. R. and H. Neudecker (1999) Matrix Differential Calculus with Applications in Statistics and Econometrics, Second Edition, John Wiley.
x <- matrix( seq( 1, 16, 1 ), nrow=4, byrow=TRUE ) print( x ) vecx <- vec( x ) print( vecx )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.