triu | R Documentation |
Extract the upper triangular part of a matrix.
triu(x, k = 0, diag = TRUE)
x |
A matrix. |
k |
The sub-diagonal at and below which the matrix is filled.
|
diag |
Logical indicating whether to include the diagonal. Default is
|
triu(ones(5, 5))
triu(ones(5, 5), diag = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.