vech | R Documentation |

This function takes a symmetric matrix and extracts a list of all lower triangular elements.

```
vech(x)
```

`x` |
A symmetric matrix. |

This function checks to make sure the matrix is square, but it does not
check for symmetry (it just pulls the lower triangular elements). The
elements are stored in column major order. The original matrix can be
restored using the `xpnd`

command.

A list of the lower triangular elements.

`xpnd`

```
symmat <- matrix(c(1,2,3,4,2,4,5,6,3,5,7,8,4,6,8,9),4,4)
vech(symmat)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.