is.lower.tri: Check if a matrix is lower or upper triangular

View source: R/tri_mat.R

is.lower.triR Documentation

Check if a matrix is lower or upper triangular

Description

Returns TRUE if the given matrix is lower or upper triangular matrix.

Usage

is.lower.tri(x, diag = FALSE)
is.upper.tri(x, diag = FALSE)

Arguments

x

a matrix of other R object with length(dim(x)) = 2.

diag

logical. Should the diagonal be included?

Value

Check if a matrix is lower or upper triangular. You can also include diagonal to the check.

See Also

lower.tri, upper.tri

Examples

  x <- matrix(rnorm(10 * 3), ncol = 3)
  R <- chol(crossprod(x))

  is.lower.tri(R)
  is.upper.tri(R)

fastmatrix documentation built on Oct. 12, 2023, 5:14 p.m.