eye | R Documentation |
Creates an nrow
-by-ncol
identity matrix.
eye(nrow = 1, ncol = nrow)
nrow |
The desired number of rows. |
ncol |
The desired number of columns. |
A nrow
-by-ncol
identity matrix.
diag.
eye(4) # 4-by-4 identity matrix
eye(4, 4) # 4-by-4 identity matrix
eye(3, 5) # 3-by-5 identity matrix
eye(5, 3) # 5-by-3 identity matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.