R/convenience.R
is.triu.Rd
Determine if a matrix is upper triangular.
is.triu(x)
A matrix.
Logical indicating whether the given matrix is lower triangular.
m <- mat("1, -1, -1, -1; 0, 1, -2, -2; 0, 0, 1, -3; 0, 0, 0, 1") is.triu(m) #> [1] TRUE is.triu(eye(3, 5)) #> [1] TRUE