upper_tri_vec {SimTimeVar}R Documentation

Turn symmetric matrix into vector

Description

An internal function not intended for the user. Turns a matrix into a vector of the upper-triangular elements (arranged by row).

Usage

upper_tri_vec(m)

Arguments

m

Matrix

Examples

# make a simple correlation matrix
x = rnorm(10); y = rnorm(10); z = rnorm(10)
mat = cor( data.frame(x,y,z) )

# turn into into vector
upper_tri_vec(mat)

[Package SimTimeVar version 1.0.0 Index]