Get all column vectors of a matrix.

This function extracts all diagonal vectors of a matrix and returns the result as a list.

1 |

`data` |
Matrix from which to extract diagonal elements |

`direction` |
Which side to begin on? Takes values of one of "left", "right" or "both". Defaults to "right". |

1 2 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.