diagonal | R Documentation |
Creates a diagonal matrix from a vector
diagonal(d)
d |
A numerical vector |
A diagonal matrix wirh the values of vector in the diagonal a zeros elsewhere
Jose Luis Vicente Villardon
diag(c(1, 2, 3, 4, 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.