Description Usage Arguments Value Note Author(s) References Examples
Given the number of rows in a symmetric matrix, calculate the row and column indices of the upper or lower triangles.
1 |
Nrow |
The number of rows |
which |
Specify |
A two-column matrix.
A straightforward way to do this is to use
which(lower.tri(YourMatrix), arr.ind = TRUE)
, however, this can be
quite slow as the number of rows increases.
Ananda Mahto
http://stackoverflow.com/a/20899060/1270695
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.