is_diag: Check if matrix is diagonal

View source: R/is-diag.r

is_diagR Documentation

Check if matrix is diagonal

Description

This function indicates whether the matrix supplied is diagonal.

Usage

is_diag(A)

Arguments

A

Matrix to be tested

Value

Logical value indicating whether matrix is diagonal

Examples

A <- cbind(c(1,1),c(0,1)
is_matrix(A)

MartinLHazelton/transportation documentation built on Aug. 5, 2023, 10:28 a.m.