vec | R Documentation |
This function returns a vector obtained by stacking the columns of \bold{X}
.
vec(x)
x |
a numeric matrix. |
Let \bold{X}
be a n
by m
matrix, then vec
(\bold{X}
)
is a nm
-dimensional vector.
x <- matrix(rep(1:10, each = 10), ncol = 10)
x
y <- vec(x)
y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.