| vecl | R Documentation |
vecl stacks the below-diagonal elements of a square matrix
column by column. unvecl is its right inverse on symmetric
matrices with zero diagonal: it forms the symmetric matrix with zero
diagonal and below-diagonal elements z.
vecl(M)
unvecl(z)
M |
a square matrix. |
z |
a numeric vector of length |
vecl returns a numeric vector of length n(n-1)/2.
unvecl returns an n \times n symmetric numeric
matrix with zero diagonal.
M <- matrix(1:9, 3, 3)
vecl(M) # c(2, 3, 6)
unvecl(c(0.1, 0.2, 0.3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.