is.tri: Verify whether a matrix is a triangular matrix.

Description Usage Arguments Value Examples

Description

Verify whether a matrix is a triangular matrix.

Usage

1
is.tri(L, method = lower.tri, tol = 1e-08)

Arguments

L

A numeric matrix.

method

Function that extracts either a lower or upper triangular part of the matrix.

tol

Tolerance for determining the differences between the elements of the matrix, required for real numbers.

Value

A logical value, whether L is a triangular matrix or not.

Examples

1
2
3
4
5
# create a non-triangular matrix
mat <- matrix(runif(9), 3, 3)

# is it a triangular matrix?
is.tri(mat)

hstojic/hfunk documentation built on May 17, 2019, 6:16 p.m.