triu: Functions for triangular matrices

View source: R/utilities.R View source: R/normalization.R

triuR Documentation

Functions for triangular matrices

Description

Get or symmeterize the upper/lower triangle of a symmetric matrix with the other side zeroed out

Usage

triu(x, k = 1)

tril(x, k = 1)

triu2diag(x, diagval = 0)

Arguments

x

the data matrix or vector

k

(0/1 flag indicate diagonal should be selected)

diagval

value to be added to the diagonal if converting from upper triangular matrix.


zdk123/SpiecEasi documentation built on Oct. 20, 2023, 6:49 a.m.