vech: Vectorization the lower triangular part of a square matrix

View source: R/utils.R

vechR Documentation

Vectorization the lower triangular part of a square matrix

Description

This function returns a vector obtained by stacking the lower triangular part of a square matrix.

Usage

vech(x)

Arguments

x

a square matrix.

Value

Let \bold{X} be a n by n matrix, then vech(\bold{X}) is a n(n+1)/2-dimensional vector.

Examples

x <- matrix(rep(1:10, each = 10), ncol = 10)
x
y <- vech(x)
y

fastmatrix documentation built on Sept. 11, 2024, 7:22 p.m.

Related to vech in fastmatrix...