diago | R Documentation |
Diagonal matrix with offset
diago(x = 1, nrow = NA, ncol = NA, names = TRUE, offset = 1L)
x |
a matrix, vector or 1D array, or missing. |
nrow , ncol |
optional dimensions for the result when x is not a matrix. |
names |
(when x is a matrix) logical indicating if the resulting vector, the diagonal of x, should inherit names from dimnames(x) if available. |
offset |
an integer value to offset the diagonal by. Default is 1 |
a square matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.