lower.tri: Lower and Upper Triangular Part of a Matrix

Description Usage Arguments See Also Examples

View source: R/lower.tri.R

Description

Returns a matrix of logicals the same size of a given matrix with entries TRUE in the lower or upper triangle.

Usage

1
2

Arguments

x

a matrix.

diag

logical. Should the diagonal be included?

See Also

diag, matrix.

Examples

1
2
3
4
(m2 <- matrix(1:20, 4, 5))
lower.tri(m2)
m2[lower.tri(m2)] <- NA
m2

robertzk/monadicbase documentation built on May 27, 2019, 10:35 a.m.