Description Usage Arguments Details Value See Also Examples
Returns the upper or lower triangle of a matrix.
1 2 3 4 5 6 7 |
x |
A matrix |
diag |
logical. Include the diagonal? Default is false. |
valuesOnly |
logical. Return only the lower/upper triangle values (including diag argument) |
otherVal |
numeric or NA. what to make nonlower/upper values. |
This function returns the lower/upper triangle of a square matrix rather
than just its indices (e.g. as lower.tri does). otherVal
is only relevant
if valuesOnly
is FALSE
.
A lower or upper triangular matrix, possibly with diagonal. If
valuesOnly
is TRUE
, then only the vector of values are
returned.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.