matrixTriangle | R Documentation |
Extract or replace the upper/lower triangular portion of a matrix
upperTriangle(x, diag = FALSE, byrow = FALSE)
upperTriangle(x, diag = FALSE, byrow = FALSE) <- value
lowerTriangle(x, diag = FALSE, byrow = FALSE)
lowerTriangle(x, diag = FALSE, byrow = FALSE) <- value
x |
[matrix] |
diag |
[logical]
If |
byrow |
[logical]
If |
value |
Either a single value or a vector of length equal to that of the current upper/lower triangular. Should be of a mode which can be coerced to that of 'x'. |
Essentially a copy from the R package gdata, to limit the number of dependency in butils.
## see the documentation of gdata::upperTriangle
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.