sym_to_triangle: Convert a sparse symmetric matrix to a sparse triangle...

Description Usage Arguments Value Examples

View source: R/conversion.R

Description

Convert a sparse symmetric matrix to a sparse triangle matrix.

Usage

1

Arguments

mat

A symmetric sparse matrix.

Value

A triangular sparse matrix, containing only the upper triangle.

Examples

1
2
symmMatrix <- Matrix::Matrix(c(1,2,1,2,5,0,1,0,0), 3, sparse = T)
triangleMatrix <- sym_to_triangle(symmMatrix)

AnnikaGable/chromium documentation built on July 12, 2018, 4 p.m.