Returns the lower triangular part of a 2-D array, setting elements above the specified diagonal to zero.
Arguments
- x
(
arrayish)
One input, with exactly 2 axes. Can be any data type. An R value materializes at its default data type.- diagonal
(
integer(1))
Diagonal offset: the kept region iscol - row <= diagonal.0(default) keeps the main diagonal and everything below it, a positive value keeps that many diagonals above it as well, and a negative one drops the main diagonal and-diagonal - 1below it.
Value
(arrayish)
Has the same shape and data type as x.