table2matrix function

Convert a table with counts to a matrix or data.frame representing those counts.