triu {ramify} | R Documentation |
Extract Upper Triangular Matrix
Description
Extract the upper triangular part of a matrix.
Usage
triu(x, k = 0, diag = TRUE)
Arguments
x |
A matrix. |
k |
Diagonal below which to zero elements. |
diag |
Logical indicating whether to include the diagonal. Default is
|
Examples
triu(ones(5, 5))
triu(ones(5, 5), diag = FALSE)
[Package ramify version 0.3.3 Index]