diag_ind | R Documentation |
Compute vector of indices for efficient access to diagonal of a square matrix
diag_ind(n)
n |
integer dimension of (square) matrix |
integer vector of length n with indices (unidimensional) of square matrix
diag_mat
ind <- diag_ind(5) diag_mat(seq(5))[ind]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.