vec: Vectorize a Matrix

Description Usage Arguments Value Examples

View source: R/vec.R

Description

Returns a 1-column matrix, stacking the columns of x, a matrix or vector

Usage

1
vec(x)

Arguments

x

A matrix or vector

Value

A one-column matrix containing the elements of x in column order

Examples

1
2
3
vec(1:3)
vec(matrix(1:6, 2, 3))
vec(c("hello", "world"))

matlib documentation built on April 4, 2018, 5:03 p.m.