Description Usage Arguments Value Examples
Similarly to upper.tri
and lower.tri
, returns a matrix of logical
s to identify the diagonal of a square matrix
1 | non.diagonal(M, output = c("matrix.logical", "vector.values"))
|
M |
square matrix. |
output |
choose to either return a matrix of logical values ( |
either return a matrix of logical values (TRUE
s, FALSE
s on the diagonal) or a vector of the subsetted values of the matrix.
1 2 | M<- matrix(sample(1:10,16,replace = TRUE),4,4)
non.diagonal(M)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.