Tidy a sparseMatrix object from the Matrix package
Tidy a sparseMatrix object from the Matrix package into a three-column data frame, row, column, and value (with zeros missing). If there are row names or column names, use those, otherwise use indices
## S3 method for class 'dgTMatrix' tidy(x, ...) ## S3 method for class 'dgCMatrix' tidy(x, ...) ## S3 method for class 'sparseMatrix' tidy(x, ...)
x |
A Matrix object |
... |
Additional arguments. Not used. Needed to match generic
signature only. Cautionary note: Misspelled arguments will be
absorbed in |
A tibble::tibble()
with columns:
row |
Row ID of the original observation. |
value |
The value/estimate of the component. Results from data reshaping. |
column |
Column name in the original matrix. |
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.