This function extracts all diagonal vectors of a matrix and returns the result as a list.
get_diags(data, direction = "right")
Matrix from which to extract diagonal elements
Which side to begin on? Takes values of one of "left", "right" or "both". Defaults to "right".
M = matrix(rnorm(9),3,3)
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.
Questions? Problems? Suggestions? Tweet to @rdrrHQian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.