diag_mat | R Documentation |
Build matrix with supplied vector on diagonal; this is much faster than diag due to the use of matrix instead of array
diag_mat(x)
x |
numeric vector for diagonal |
matrix of size length(x) x length(x) with x along diagonal
diag_ind
diag_mat(seq(5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.