diag2vec {OpenMx} | R Documentation |
Given an input matrix, diag2vec
returns a column vector of the elements along the diagonal.
diag2vec(x)
x |
an input matrix. |
Similar to the function diag
, except that the input argument is always
treated as a matrix.
diag2vec(matrix(1:9, 3, 3)) diag2vec(matrix(1:12, 3, 4))