# lower.tri

From base v3.3
by R-core R-core@R-project.org

##### Lower and Upper Triangular Part of a Matrix

Returns a matrix of logicals the same size of a given matrix with
entries `TRUE`

in the lower or upper triangle.

- Keywords
- array

##### Usage

```
lower.tri(x, diag = FALSE)
upper.tri(x, diag = FALSE)
```

##### Arguments

- x
- a matrix.
- diag
- logical. Should the diagonal be included?

##### See Also

##### Examples

`library(base)`

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

*Documentation reproduced from package base, version 3.3, License: Part of R @VERSION@*

### Community examples

Looks like there are no examples yet.