m2v {demogR} | R Documentation |
Utility that takes a matrix n x m and stacks its columns to form a column vector of length mn.
m2v(A)
A |
an m x n matrix |
For an m x n input matrix, returns a m*n x 1 matrix (i.e., a column vector).
Meant to capture the MATLAB functionality of the colon operator, A(:)
A <- matrix(rnorm(9), nr=3, nc=3)
m2v(A)