View source: R/spd-vectorize.R
spd.vectorize | R Documentation |
Function converts between a square symmetric matrix and a vector of the lower triangular elements + diagonal. Allows optional scaling of the off-diagonal entries in order to preserve the norm.
spd.vectorize(x, scaling = F)
x |
Either a square matrix, or a vector contains the lower triangular elements of x (including the diagonal elements) |
scaling |
If TRUE, scales the off diagonal elements by sqrt(2) to preserve the norm of the resulting vector |
If input is a square matrix, converts the lower triangular elements (including the diagonal) into a numeric vector. If input is a numeric vector, converts the input to a symmetric matrix. Note that, if the input is a vector, its length must be a triangular number.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.