cast_sparse function

Create a sparse matrix from row names, column names, and values in a table.