lower_tri: Find and return the lower triangle of a matrix

View source: R/utils.R

lower_triR Documentation

Find and return the lower triangle of a matrix

Description

Same as lower.tri() except it returns the values from the matrix (rather than a positional matrix that lets you look up the values).

Usage

lower_tri(x, diag = FALSE)

Arguments

x

a matrix or other R object with length(dim(x)) == 2. For back compatibility reasons, when the above is not fulfilled, as.matrix(x) is called first.

diag

logical. Should the diagonal be included?

Value

The values in the lower triangular part of the matrix.


supernova documentation built on May 29, 2024, 4:47 a.m.