Learn R Programming

parcor (version 0.2-6)

sym2vec: Transform symmetric matrix to vector

Description

This function transforms the upper triangle (without diagonal) of a matrix A into a vector.

Usage

sym2vec(A)

Arguments

A
quadratic matrix of size p x p

Value

vector of length p(p-1)/2

Details

The entries of the matrix A are stacked line-by-line.

Examples

Run this code
p<-7
A<-matrix(rnorm(p*p),ncol=p)
v<-sym2vec(A)

Run the code above in your browser using DataLab