powered by
Methods for getting the diagonal of a float matrix, or constructing a float matrix given a float vector.
# S4 method for float32 diag(x = 1, nrow, ncol)
A float vector or matrix, depending on the input.
A float vector (create a diagonal matrix) or matrix (get its diagonal).
As in base R's diag().
diag()
library(float) s = flrunif(10, 3) s diag(s) diag(diag(s))
Run the code above in your browser using DataLab