matrix_to_hinton: Convert a matrix to a tidy data frame for use with geom_hinton()
Description
Reshapes a numeric matrix into a long-form data frame with one row per
matrix entry. Row 1 of the matrix is placed at the top of the resulting
plot (highest y value), matching the visual convention of matrix notation.
A data frame with columns named by rowname_col, colname_col,
and value_col. If x has row or column names, additional columns
row_label and col_label are included.
Arguments
x
A numeric matrix.
rowname_col
Name of the column that will hold the row index.
Default "row".
colname_col
Name of the column that will hold the column index.
Default "col".
value_col
Name of the column that will hold the matrix values.
Default "weight".