Utility function to tidy a simple triplet matrix
tidy_triplet(x, triplets, row_names = NULL, col_names = NULL)returns a triplet matrix in the form of a data frame. The first column indexes rows. The second column indexes columns. The third column contains the i,j values.
Object with rownames and colnames
A data frame or list of i, j, x
rownames, if not gotten from rownames(x)
colnames, if not gotten from colnames(x)