Learn R Programming

demogR (version 0.6.0)

m2v: m2v

Description

Utility that takes a matrix n x m and stacks its columns to form a column vector of length mn.

Usage

m2v(A)

Arguments

A

an m x n matrix

Value

For an m x n input matrix, returns a m*n x 1 matrix (i.e., a column vector).

See Also

odiag

Examples

Run this code
# NOT RUN {
A <- matrix(rnorm(9), nr=3, nc=3)
m2v(A)
# }

Run the code above in your browser using DataLab