diag | R Documentation |
Methods for getting the diagonal of a float matrix, or constructing a float matrix given a float vector.
## S4 method for signature 'float32' diag(x = 1, nrow, ncol)
x |
A float vector (create a diagonal matrix) or matrix (get its diagonal). |
nrow, ncol |
As in base R's |
A float vector or matrix, depending on the input.
library(float) s = flrunif(10, 3) s diag(s) diag(diag(s))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.